From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/intex/setup.py.in | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 support/intex/setup.py.in (limited to 'support/intex/setup.py.in') diff --git a/support/intex/setup.py.in b/support/intex/setup.py.in new file mode 100644 index 0000000000..aa7ab42570 --- /dev/null +++ b/support/intex/setup.py.in @@ -0,0 +1,79 @@ +#! /usr/bin/python +# -*- coding: latin-1 -*- +# $Id$ +""" +Copyright (C) 2007 by Martin Thorsen Ranang +""" +__author__ = "Martin Thorsen Ranang " +__revision__ = "$Rev$" +__version__ = "@PACKAGE_VERSION@" + +from distutils.core import setup +import os + +LONG_DESCRIPTION = """\ +A concept indexing and typesetting package for LaTeX. + +This package adds functionality to LaTeX that eases typesetting and +indexing of phrases, acronyms, and names in a consistent manner +throughout documents of arbitrary length. +""" + + +def isPackage(filename): + return (os.path.isdir(filename) and + os.path.isfile(os.path.join(filename, '__init__.py'))) + +def packagesFor(filename, basePackage=""): + """Find all packages in filename. + """ + set_of_packages = {} + + for item in os.listdir(filename): + directory = os.path.join(filename, item) + if isPackage(directory): + if basePackage: + moduleName = '%s.%s' % (basePackage, item) + else: + moduleName = item + + set_of_packages[moduleName] = directory + set_of_packages.update(packagesFor(directory, moduleName)) + + return set_of_packages + +def main(): + """Module mainline (for standalone execution). + """ + packages = packagesFor('lib') + + author_name = __author__.split(' <')[0] + author_email = __author__.rsplit(' ')[-1] + + if True: + setup( + name='@PACKAGE_NAME@', + version='@PACKAGE_VERSION@', + description='The InTeX Package', + long_description=LONG_DESCRIPTION, + license='LPPL', + author=author_name, + author_email=author_email, + url='http://www.ranang.org/projects/intex/', + package_dir=packages, + packages=packages.keys(), + scripts=[ + 'src/mkintex', + ], + data_files=[ + # TeX-package files: + ('share/texmf/tex/latex/@PACKAGE_NAME@', + ['latex/intex.sty', 'latex/intex.pdf']), + # Man pages, section 1: + ('share/man/man1', ['doc/mkintex.1.gz']), + + ], + ) + +if __name__ == "__main__": + main() -- cgit v1.2.3