forked from hygeos/polymer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
48 lines (42 loc) · 1.11 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
from distutils.core import setup
from distutils.extension import Extension
from pathlib import Path
import numpy
from Cython.Build import cythonize
NAME = "Polymer"
DESC = "Polymer atmospheric correction algorithm (http://dx.doi.org/10.1364/OE.19.009783)"
SRC_DIR = 'polymer'
DEBUG=False
ANNOTATE=True
if DEBUG:
compiler_directives = {
'profile': True,
'embedsignature': True,
'language_level': '3',
}
else:
compiler_directives = {
'boundscheck': False,
'initializedcheck': False,
'cdivision': True,
'embedsignature': True,
'language_level': '3',
}
setup(
name = NAME,
description = DESC,
ext_modules=cythonize(
[Extension(
'*',
sources=[
'polymer/*.pyx',
],
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')]
)],
build_dir='build',
compiler_directives=compiler_directives,
annotate=ANNOTATE,
nthreads=4,
),
include_dirs = [numpy.get_include()],
)