-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
102 lines (90 loc) · 3.97 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
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import cython
import numpy
import scipy
import matplotlib
import sys
import os
print('\nDependencies versions:')
print('python: ' + str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+str(sys.version_info[2]))
print('cython: ' + cython.__version__)
print('numpy: ' + numpy.__version__)
print('scipy: ' + scipy.__version__)
print('matplotlib: ' + matplotlib.__version__)
print()
ecadef = ["-O3", "-Wunused-but-set-variable"]
iddef = ["/usr/local/include/", "./", numpy.get_include()]
lddef = ["/usr/local/lib/"]
compdir = {'boundscheck': False, 'nonecheck': False, 'wraparound': False, 'cdivision': True,
'profile': False, 'infer_types': False, 'language_level' : '3'}
extensions = cythonize([
Extension('openConv.base',
sources=['openConv/base.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.trap',
sources=['openConv/trap.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.fft',
sources=['openConv/fft.pyx'],
extra_compile_args = ecadef + ['-lfftw3', '-lm'],
extra_link_args = ['-lfftw3', '-lm'],
include_dirs = iddef
),
Extension('openConv.fmm',
sources=['openConv/fmm.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.wrap',
sources=['openConv/wrap.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.constants',
sources=['openConv/constants.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.mathFun',
sources=['openConv/mathFun.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.interpolate',
sources=['openConv/interpolate.pyx'],
extra_compile_args = ecadef,
include_dirs = iddef
),
Extension('openConv.cheb',
sources=['openConv/cheb.pyx'],
extra_compile_args = ecadef + ['-lfftw3', '-lm'],
extra_link_args = ['-lfftw3', '-lm'],
include_dirs = iddef
)
],
compiler_directives = compdir
)
vers = '0.2'
setup(name = 'openConv',
version=vers,
packages = ['openConv'],
package_data={'openConv': ['*.pxd','coeffsData/*']},
cmdclass = {'build_ext': build_ext},
ext_modules = extensions
)
logoArt = """
___
___ _ __ ___ _ _ / __|___ _ ___ __
/ _ \ '_ \/ -_) ' \ (__/ _ \ ' \ V /
\___/ .__/\___|_||_\___\___/_||_\_/
|_|
openConv """+vers+""" Copyright (C) 2017-2020 Oliver Sebastian Haas
"""
print(logoArt)