forked from smutch/sector
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
48 lines (43 loc) · 1.94 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
from distutils.core import setup
from setuptools import find_packages, Extension
from Cython.Distutils import build_ext
exts = [Extension("sector.utils",
sources = ["sector/utils.pyx"],
include_dirs = ["sector/"]),
Extension("sector.sfh",
sources = ["sector/sfh.pyx"],
include_dirs = ["sector/"]),
Extension("sector.sector",
sources = ["sector/clib/tools.c",
"sector/clib/sector.c",
"sector/clib/spectra.c",
"sector/clib/dust.c",
"sector/clib/igm.c",
"sector/sector.pyx"],
include_dirs = ["sector/"],
extra_compile_args = ['-fopenmp', '-lhdf5', '-lhdf5_hl'],
extra_link_args = ['-fopenmp', '-lhdf5', '-lhdf5_hl']),
Extension("sector.dust.dust",
sources = ["sector/clib/tools.c",
"sector/clib/sector.c",
"sector/clib/spectra.c",
"sector/clib/dust.c",
"sector/clib/igm.c",
"sector/dust/dust.pyx"],
include_dirs = ["sector/"],
extra_compile_args = ['-fopenmp', '-lhdf5', '-lhdf5_hl'],
extra_link_args = ['-fopenmp', '-lhdf5', '-lhdf5_hl'])]
for e in exts:
e.cython_directives = {"embedsignature":True, "language_level": "2"}
exec(open('sector/version.py', 'r').read())
setup(
name = 'sector',
version = __version__,
description = 'Package to compute SEDs for semi-analytic models',
author = 'Yisheng Qiu',
author_email = 'yishengq@student.unimelb.edu.au',
ext_modules = exts,
cmdclass = {'build_ext': build_ext},
packages = find_packages(),
package_data = {'sector/filters':['*.npy'], 'sector/sedlib/':['*.hdf5']}
)