-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
69 lines (57 loc) · 1.71 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
from __future__ import print_function
from distutils.core import setup, Extension
VERSION = '0.1'
import glob
import sys
import numpy
includes = [numpy.get_include()]
libdirs = []
library = ['fftw3f', 'gslcblas', 'gsl', 'lapack', 'actpol']
sources = glob.glob('src/*.c')
headers = glob.glob('src/*.h')
compile_args = ['-std=c99','-fopenmp', '-Wno-strict-aliasing']
extra_link_args = ['-fopenmp']
## Everything in bin is a script
scripts = [x for x in glob.glob('bin/*') if x[-1] != '~']
# Set C extension to live at in libactpol package.
module1 = Extension('moby2/libactpol',
sources=sources,
depends=headers,
extra_compile_args=compile_args,
extra_link_args=extra_link_args,
include_dirs=includes,
library_dirs=libdirs,
libraries=library)
analysis_modules = [
'det_sens',
'fp_fit',
'beam_ana',
'jumps',
'tod_ana',
'hwp',
]
if sys.version_info.major >= 3:
analysis_modules.append('socompat')
setup (name = 'moby2',
version = VERSION,
description = 'ACTpol support',
package_dir = {'moby2': 'python'},
ext_modules = [module1],
scripts = scripts,
packages = (
['moby2',
'moby2.aux_data',
'moby2.detectors',
'moby2.ephem',
'moby2.instruments',
'moby2.instruments.actpol',
'moby2.instruments.mbac',
'moby2.mapping',
'moby2.pointing',
'moby2.scripting',
'moby2.tod',
'moby2.util',
'moby2.analysis'] +
['moby2.analysis.%s' % p for p in analysis_modules]
)
)