rename config section for filelocator module
[PyX/mjg.git] / setup.py
blob8ee3b879fad2997d51204ec3fe5bbd467ba90f37
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."""
12 try:
13 from setuptools import setup, Extension
14 setuptools_args={"zip_safe": True}
15 except ImportError:
16 from distutils.core import setup, Extension
17 setuptools_args={}
19 import ConfigParser
20 import pyx.version
23 # build list of extension modules
26 ext_modules = []
27 pykpathsea_ext_module = Extension("pyx.pykpathsea",
28 sources=["pyx/pykpathsea.c"],
29 libraries=["kpathsea"])
30 t1code_ext_module = Extension("pyx.font._t1code",
31 sources=["pyx/font/_t1code.c"])
33 # obtain information on which modules have to be built from setup.cfg file
34 cfg = ConfigParser.ConfigParser()
35 cfg.read("setup.cfg")
36 if cfg.has_section("PyX"):
37 if cfg.has_option("PyX", "build_pykpathsea") and cfg.getboolean("PyX", "build_pykpathsea"):
38 ext_modules.append(pykpathsea_ext_module)
39 if cfg.has_option("PyX", "build_t1code") and cfg.getboolean("PyX", "build_t1code"):
40 ext_modules.append(t1code_ext_module)
42 description, long_description = __doc__.split("\n\n", 1)
44 setup(name="PyX",
45 version=pyx.version.version,
46 author="Jörg Lehmann, André Wobst",
47 author_email="pyx-devel@lists.sourceforge.net",
48 url="http://pyx.sourceforge.net/",
49 description=description,
50 long_description=long_description,
51 license="GPL",
52 packages=["pyx", "pyx/graph", "pyx/graph/axis", "pyx/font", "pyx/dvi"],
53 package_data={"pyx": ["data/afm/*", "data/lfs/*", "data/def/*", "data/pyxrc"]},
54 ext_modules=ext_modules,
55 classifiers=["Development Status :: 3 - Alpha",
56 "Intended Audience :: Developers",
57 "Intended Audience :: End Users/Desktop",
58 "License :: OSI Approved :: GNU General Public License (GPL)",
59 "Operating System :: OS Independent",
60 "Programming Language :: Python",
61 "Topic :: Multimedia :: Graphics",
62 "Topic :: Scientific/Engineering :: Visualization",
63 "Topic :: Software Development :: Libraries :: Python Modules"],
64 download_url="http://sourceforge.net/project/showfiles.php?group_id=45430",
65 platforms="OS independent",
66 **setuptools_args)