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