-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
49 lines (40 loc) · 1.01 KB
/
setup.py
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from setuptools import setup
try:
from Cython.Build import cythonize
except ImportError:
cythonize = None
try:
import numpy
except ImportError:
numpy = None
import os
os.chdir(os.path.normpath(os.path.dirname(__file__)))
__version__ = None
exec(open('volpy/version.py').read())
compiler_directives = {
'boundscheck': False,
}
# Try to specify extension modules
ext_modules = []
if cythonize:
ext_modules = cythonize('volpy/*.pyx',
compiler_directives=compiler_directives)
# Try to get numpy's include directories
include_dirs = []
if numpy:
include_dirs = numpy.get_include()
setup(
name='volpy',
version=__version__,
ext_modules=ext_modules,
include_dirs=include_dirs,
packages=['volpy'],
include_package_data=True,
description='A volume renderer for python',
author='Paul Kilgo',
author_email='paulkilgo@gmail.com',
classifiers=[
'Operating System :: POSIX',
'Programming Language :: Python :: 3',
],
)