forked from SharperJBCA/COMAPreduce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (54 loc) · 2.63 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
from distutils.core import setup
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.core import Extension
import os
import numpy as np
from Cython.Build import cythonize
# Capture the current git commit to use as version
exec(open("comancpipeline/version.py").read())
try:
slalib_path = os.environ['SLALIB_LIBS']
except KeyError:
slalib_path = '/star/lib' # default path of Manchester machines
print('Warning: No SLALIB_LIBS environment variable set, assuming: {}'.format(slalib_path))
filters = Extension(name = 'comancpipeline.Tools.filters',
include_dirs=[np.get_include()],
sources = ['comancpipeline/Tools/filters.pyx'])
pysla = Extension(name = 'comancpipeline.Tools.pysla',
sources = ['comancpipeline/Tools/pysla.f90','comancpipeline/Tools/sla.f'],
#libraries=['sla'],
#library_dirs =['{}'.format(slalib_path)],
f2py_options = [])
# extra_link_args=['-Wl,-rpath,{}'.format(slalib_path)])
#'Iglibc_fix.h',
ffuncs = Extension(name = 'comancpipeline.Tools.ffuncs',
sources = ['comancpipeline/Tools/ffuncs.f90'])
# alglib = Extension('comancpipeline.Tools.alglib_optimize',
# ['comancpipeline/Tools/alglib_optimize.pyx'],
# library_dirs=["/local/scratch/sharper/etc/lib"],
# include_dirs=["/local/scratch/sharper/etc/lib"],
# language="c++",
# extra_compile_args=['-fopenmp'],
# extra_link_args=['-fopenmp']
# )
#'-lAlglib',
filters = Extension(name = 'comancpipeline.Tools.median_filter.medfilt',
include_dirs=[np.get_include()],
sources = ['comancpipeline/Tools/median_filter/medfilt.pyx'])
binFuncs = Extension(name='comancpipeline.Tools.binFuncs',
include_dirs=[np.get_include()],
sources=['comancpipeline/Tools/binFuncs.pyx'])
config = {'name':'comancpipeline',
'version':__version__,
'packages':['comancpipeline',
'comancpipeline.Analysis',
'comancpipeline.data',
'comancpipeline.Tools',
'comancpipeline.MapMaking'],
'package_data':{'':["*.dat","gains.hd5"]},
'include_package_data':True,
'ext_modules':cythonize([ffuncs,pysla, filters,binFuncs],
compiler_directives={'language_level':"3"})}
setup(**config)
print(__version__)