-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
55 lines (51 loc) · 1.98 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
from setuptools import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from os.path import join, dirname
import numpy
# Paths to numpy libraries
lib_path_npyrandom = join(numpy.get_include(), '..', '..', 'random', 'lib')
lib_path_npymath = join(numpy.get_include(), '..', 'lib')
# Cython modules to be compiled
extensions = [
Extension(
"goodpoints.ktc", [join("goodpoints","ktc.pyx")],
extra_compile_args=['-O3'],
language="c", include_dirs=[numpy.get_include()],
library_dirs=[lib_path_npyrandom,lib_path_npymath],
libraries=['npyrandom','npymath','m']
),
Extension(
"goodpoints.compressc", [join("goodpoints","compressc.pyx")],
extra_compile_args=['-O3'],
language="c", include_dirs=[numpy.get_include()],
library_dirs=[lib_path_npyrandom,lib_path_npymath],
libraries=['npyrandom','npymath','m'],
),
Extension(
"goodpoints.cttc", [join("goodpoints","cttc.pyx")],
extra_compile_args=['-O3'],
language="c", include_dirs=[numpy.get_include()],
library_dirs=[lib_path_npyrandom,lib_path_npymath],
libraries=['npyrandom','npymath','m'],
),
Extension(
"goodpoints.gaussianc", [join("goodpoints","gaussianc.pyx")],
extra_compile_args=['-O3'],
language="c", include_dirs=[numpy.get_include()],
library_dirs=[lib_path_npyrandom,lib_path_npymath],
libraries=['npyrandom','npymath','m'],
),
Extension(
"goodpoints.sobolevc", [join("goodpoints","sobolevc.pyx")],
extra_compile_args=['-O3'],
language="c", include_dirs=[numpy.get_include()],
library_dirs=[lib_path_npyrandom,lib_path_npymath],
libraries=['npyrandom','npymath','m'],
),
]
# Path to Cython declaration (PXD) files
include_path = ["goodpoints"]
setup(include_package_data=True,
ext_modules=cythonize(extensions, language_level = "3",
include_path=include_path))