add documentation for new file locator configuration
[PyX/mjg.git] / setup.py
blob3b4c2be4c98209f8a910af560d5129f40fe59e57
1 #!/usr/bin/env python
2 # -*- encoding: utf-8 -*-
4 """Python package for the generation of PostScript and PDF files
6 PyX is a Python package for the creation of PostScript and PDF files. It
7 combines an abstraction of the PostScript drawing model with a TeX/LaTeX
8 interface. Complex tasks like 2d and 3d plots in publication-ready quality are
9 built out of these primitives.
10 """
13 try:
14 from setuptools import setup, Extension
15 setuptools_args={"zip_safe": True}
16 except ImportError:
17 from distutils.core import setup, Extension
18 setuptools_args={}
20 import ConfigParser
21 import pyx.version
24 # build list of extension modules
27 ext_modules = []
28 pykpathsea_ext_module = Extension("pyx.pykpathsea",
29 sources=["pyx/pykpathsea.c"],
30 libraries=["kpathsea"])
31 t1code_ext_module = Extension("pyx.font._t1code",
32 sources=["pyx/font/_t1code.c"])
34 # obtain information on which modules have to be built from setup.cfg file
35 cfg = ConfigParser.ConfigParser()
36 cfg.read("setup.cfg")
37 if cfg.has_section("PyX"):
38 if cfg.has_option("PyX", "build_pykpathsea") and cfg.getboolean("PyX", "build_pykpathsea"):
39 ext_modules.append(pykpathsea_ext_module)
40 if cfg.has_option("PyX", "build_t1code") and cfg.getboolean("PyX", "build_t1code"):
41 ext_modules.append(t1code_ext_module)
43 description, long_description = __doc__.split("\n\n", 1)
45 setup(name="PyX",
46 version=pyx.version.version,
47 author="Jörg Lehmann, André Wobst",
48 author_email="pyx-devel@lists.sourceforge.net",
49 url="http://pyx.sourceforge.net/",
50 description=description,
51 long_description=long_description,
52 license="GPL",
53 packages=["pyx", "pyx/graph", "pyx/graph/axis", "pyx/font", "pyx/dvi"],
54 package_data={"pyx": ["data/afm/*", "data/lfs/*", "data/def/*", "data/pyxrc"]},
55 ext_modules=ext_modules,
56 classifiers=["Development Status :: 3 - Alpha",
57 "Intended Audience :: Developers",
58 "Intended Audience :: End Users/Desktop",
59 "License :: OSI Approved :: GNU General Public License (GPL)",
60 "Operating System :: OS Independent",
61 "Programming Language :: Python",
62 "Topic :: Multimedia :: Graphics",
63 "Topic :: Scientific/Engineering :: Visualization",
64 "Topic :: Software Development :: Libraries :: Python Modules"],
65 download_url="http://sourceforge.net/project/showfiles.php?group_id=45430",
66 platforms="OS independent",
67 **setuptools_args)