summaryrefslogtreecommitdiff
path: root/support/intex/setup.py.in
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/intex/setup.py.in
Initial commit
Diffstat (limited to 'support/intex/setup.py.in')
-rw-r--r--support/intex/setup.py.in79
1 files changed, 79 insertions, 0 deletions
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 <mtr@ranang.org>"
+__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()