2 # -*- coding: ISO-8859-1 -*-
4 """Python package for the generation of encapsulated PostScript figures
6 PyX is a Python package for the creation of encapsulated PostScript figures.
7 It provides both an abstraction of PostScript and a TeX/LaTeX interface.
8 Complex tasks like 2d and 3d plots in publication-ready quality are built out
12 from distutils
.core
import setup
, Extension
18 # build list of extension modules
22 pykpathsea_ext_module
= Extension("pyx.pykpathsea._pykpathsea",
23 sources
=["pyx/pykpathsea/pykpathsea.c"],
24 libraries
=["kpathsea"])
25 t1strip_ext_module
= Extension("pyx.t1strip._t1strip",
26 sources
=["pyx/t1strip/t1strip.c", "pyx/t1strip/writet1.c"])
28 # obtain information on which modules have to be built from setup.cfg file
29 cfg
= ConfigParser
.ConfigParser()
31 if cfg
.has_section("PyX"):
32 if cfg
.has_option("PyX", "build_pykpathsea") and cfg
.getboolean("PyX", "build_pykpathsea"):
33 ext_modules
.append(pykpathsea_ext_module
)
34 if cfg
.has_option("PyX", "build_t1strip") and cfg
.getboolean("PyX", "build_t1strip"):
35 ext_modules
.append(t1strip_ext_module
)
41 data_files
= [('share/pyx', ['pyx/lfs/10pt.lfs',
47 'pyx/lfs/foils17pt.lfs',
48 'pyx/lfs/foils20pt.lfs',
49 'pyx/lfs/foils25pt.lfs',
50 'pyx/lfs/foils30pt.lfs',
54 # additional package metadata (only available in Python 2.3 and above)
57 if sys
.version_info
>= (2, 3):
58 addargs
= { "classifiers":
59 [ "Development Status :: 3 - Alpha",
60 "Intended Audience :: Developers",
61 "Intended Audience :: End Users/Desktop",
62 "License :: OSI Approved :: GNU General Public License (GPL)",
63 "Operating System :: OS Independent",
64 "Programming Language :: Python",
65 "Topic :: Multimedia :: Graphics",
66 "Topic :: Scientific/Engineering :: Visualization",
67 "Topic :: Software Development :: Libraries :: Python Modules" ],
69 "http://sourceforge.net/project/showfiles.php?group_id=45430",
76 # We're using the module docstring as the distutils descriptions. (seen in Zope3 setup.py)
77 doclines
= __doc__
.split("\n")
80 version
=pyx
.__version
__,
81 author
="Jörg Lehmann, André Wobst",
82 author_email
="pyx-devel@lists.sourceforge.net",
83 url
="http://pyx.sourceforge.net/",
84 description
=doclines
[0],
85 long_description
="\n".join(doclines
[2:]),
87 packages
=['pyx', 'pyx/t1strip', 'pyx/pykpathsea'],
88 ext_modules
=ext_modules
,
89 data_files
=data_files
,