-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
30 lines (24 loc) · 1.28 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
#!/usr/bin/env python
# to compile fortran code for spherical harmonic transforms inplace, run
# python setup.py build_ext --inplace --fcompiler=gnu95
import glob
import numpy as np
import distutils
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('quicklens',parent_package,top_path)
config.add_extension('quicklens.math.cwignerd', ['quicklens/math/wignerd.pyf', 'quicklens/math/wignerd.c'])
if distutils.version.StrictVersion(np.version.version) > distutils.version.StrictVersion('1.6.1'):
config.add_extension('quicklens.shts.fsht', ['quicklens/shts/shts.f95'],
libraries=['gomp'], f2py_options=[],
extra_f90_compile_args=['-ffixed-line-length-1000', '-fopenmp'],
extra_compile_args=['-fopenmp'], extra_link_args=[],)
else:
config.add_extension('quicklens.shts.fsht', ['quicklens/shts/shts.f95'],
libraries=['gomp'], f2py_options=[],
extra_compile_args=['-fopenmp'], extra_link_args=[],)
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
setup(name='lensing',
configuration=configuration)