various documentation fixes
[PyX.git] / setup.py
blob09acc8944b54e2e68c468ac515144d4cd2cc89ae
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."""
11 import ConfigParser
12 import pyx.version
14 cfg = ConfigParser.ConfigParser()
15 cfg.read("setup.cfg")
17 # obtain information on which modules have to be built and whether to use setuptools
18 # instead of distutils from setup.cfg file
20 if cfg.has_section("PyX"):
21 if cfg.has_option("PyX", "use_setuptools") and cfg.getboolean("PyX", "use_setuptools"):
22 from setuptools import setup, Extension
23 setuptools_args={"zip_safe": True}
24 else:
25 from distutils.core import setup, Extension
26 setuptools_args={}
29 # build list of extension modules
31 ext_modules = []
32 pykpathsea_ext_module = Extension("pyx.pykpathsea",
33 sources=["pyx/pykpathsea.c"],
34 libraries=["kpathsea"])
35 t1code_ext_module = Extension("pyx.font._t1code",
36 sources=["pyx/font/_t1code.c"])
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)
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)