-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
37 lines (33 loc) · 1009 Bytes
/
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
from numpy.distutils.core import setup, Extension
import os
from setuptools import find_packages
import numpy.f2py as npf2py
assert "LD_LIBRARY_PATH" in os.environ.keys(), "Did you add lapack to LD_LIBRARY_PATH?"
ext = Extension(
name="macronova2py",
sources=[
"kilopop/fortran_source/module_physics_constants.f90",
"kilopop/fortran_source/hratelib.f90",
"kilopop/fortran_source/macronova_Pinto_Eastman_CNS.f90",
"kilopop/fortran_source/macronova2py.f90",
],
extra_f90_compile_args=[
"-cpp",
"-g",
"-O3",
"-ffpe-trap=overflow,underflow,invalid",
"-Wall",
"-fbacktrace",
"-fimplicit-none",
"-fdefault-double-8",
"-fdefault-real-8",
"-fopenmp",
"-ffree-line-length-512",
],
libraries=["lapack", "blas"],
library_dirs=[
os.environ["LD_LIBRARY_PATH"],
],
f2py_options=["c", "only:", "calculate_luminosity", ":", "m"],
)
setup(ext_modules=[ext])