File: setup.py

package info (click to toggle)
pythontracer 8.10.16-1.2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 352 kB
  • ctags: 461
  • sloc: python: 441; ansic: 325; makefile: 9
file content (29 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from distutils.core import setup
from distutils.extension import Extension

VERSION = "8.10.16"

try:
    from Pyrex.Distutils import build_ext
except ImportError:
    cmdclass = dict()
    def fixpyx(x):
        return x.replace('.pyx', '.c')
else:
    cmdclass = dict(build_ext=build_ext)
    def fixpyx(x):
        return x
def make_extension(name, filenames):
    return Extension(name, ["graphfile/graphfile.c"] +
                     map(fixpyx, filenames),
                     include_dirs=["graphfile", "graphfile-python", "pyrex-lib"],
                     define_macros=[("PYREX_WITHOUT_ASSERTIONS", "")])
setup(name = "pythontracer", version = VERSION,
      ext_modules = [
          make_extension("graphfile", ["graphfile-python/graphfile.pyx"]),
          make_extension("pytracer", ["tracer/pytracer.pyx", "tracer/rotatingtree.c"],
),
      ],
      py_modules = ["pytracerview"],
      scripts = ["tracer/pytracefile.py"],
      cmdclass = cmdclass)