forked from sklam/numba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
130 lines (109 loc) · 4.61 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from distutils.core import setup, Extension
import sys
import os
import numpy
import numpy.distutils.misc_util as np_misc
import versioneer
versioneer.versionfile_source = 'numba/_version.py'
versioneer.versionfile_build = 'numba/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'numba-'
cmdclass = versioneer.get_cmdclass()
setup_args = {
'long_description': open('README.md').read(),
}
GCCFLAGS = ["-std=c89", "-Wdeclaration-after-statement", "-Werror"]
if os.environ.get("NUMBA_GCC_FLAGS"):
CFLAGS = GCCFLAGS
else:
CFLAGS = []
if sys.platform == 'darwin' and sys.version_info[:2] == (2, 6):
cpp_link_args = ['-lstdc++']
else:
cpp_link_args = []
npymath_info = np_misc.get_info('npymath')
ext_dynfunc = Extension(name='numba._dynfunc', sources=['numba/_dynfunc.c'],
extra_compile_args=CFLAGS,
depends=["numba/_pymodule.h"])
ext_numpyadapt = Extension(name='numba._numpyadapt',
sources=['numba/_numpyadapt.c'],
include_dirs=[numpy.get_include()],
extra_compile_args=CFLAGS,
depends=["numba/_pymodule.h"])
ext_npymath_exports = Extension(name='numba._npymath_exports',
sources=['numba/_npymath_exports.c'],
include_dirs=npymath_info['include_dirs'],
libraries=npymath_info['libraries'],
library_dirs=npymath_info['library_dirs'],
define_macros=npymath_info['define_macros'])
ext_dispatcher = Extension(name="numba._dispatcher",
include_dirs=[numpy.get_include()],
sources=['numba/_dispatcher.c',
'numba/_dispatcherimpl.cpp',
'numba/typeconv/typeconv.cpp'],
depends=["numba/_pymodule.h",
"numba/_dispatcher.h"],
extra_link_args=cpp_link_args)
ext_helperlib = Extension(name="numba._helperlib",
include_dirs=[numpy.get_include()],
sources=["numba/_helperlib.c", "numba/_math_c99.c"],
extra_compile_args=CFLAGS,
depends=["numba/_pymodule.h",
"numba/_math_c99.h",
"numba/mathnames.inc"])
ext_typeconv = Extension(name="numba.typeconv._typeconv",
sources=["numba/typeconv/typeconv.cpp",
"numba/typeconv/_typeconv.cpp"],
depends=["numba/_pymodule.h"],
extra_link_args=cpp_link_args)
ext_npyufunc_ufunc = Extension(name="numba.npyufunc._internal",
sources=["numba/npyufunc/_internal.c"],
include_dirs=[numpy.get_include()],
depends=["numba/npyufunc/_internal.h",
"numba/_pymodule.h"])
ext_mviewbuf = Extension(name='numba.mviewbuf',
sources=['numba/mviewbuf.c'])
ext_modules = [ext_dynfunc, ext_numpyadapt, ext_npymath_exports, ext_dispatcher,
ext_helperlib, ext_typeconv, ext_npyufunc_ufunc, ext_mviewbuf]
packages = [
"numba",
"numba.targets",
"numba.tests",
"numba.typing",
"numba.typeconv",
"numba.npyufunc",
"numba.pycc",
"numba.servicelib",
"numba.cuda",
"numba.cuda.cudadrv",
"numba.cuda.tests",
"numba.cuda.tests.cudadrv",
"numba.cuda.tests.cudapy",
]
setup(name='numba',
description="compiling Python code using LLVM",
version=versioneer.get_version(),
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
# "Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
# "Programming Language :: Python :: 3.3",
"Topic :: Utilities",
],
package_data={
"numba": ["*.c", "*.h", "*.cpp", "*.inc"],
"numba.npyufunc": ["*.c", "*.h"],
"numba.typeconv": ["*.cpp", "*.hpp"],
},
scripts=["numba/pycc/pycc", "bin/numba"],
author="Continuum Analytics, Inc.",
author_email="numba-users@continuum.io",
url="http://numba.github.com",
ext_modules=ext_modules,
packages=packages,
license="BSD",
cmdclass=cmdclass,
**setup_args)