-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
79 lines (71 loc) · 1.86 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
70
71
72
73
74
75
76
77
78
#
# Here's a sample setuptools that builds the cython and fortran extensions
# However, I gave up and just made a simple makefile.
#
from __future__ import division, absolute_import, print_function
from numpy.distutils.core import Extension
import os
from Cython.Distutils import build_ext
import numpy
include_dirs = [numpy.get_include()]
ext_ffa = [
Extension(
name="FFA_cy",
sources=["FFA/FFA_cy.pyx"],
include_dirs=include_dirs,
),
Extension(name="FBLS_cy",
sources=["FFA/FBLS_cy.pyx"],
include_dirs=include_dirs
),
Extension(
name="BLS_cy",
sources=["FFA/BLS_cy.pyx"],
include_dirs=include_dirs
),
Extension(
name="FFA_cext",
sources=["FFA/FFA_cext.pyx","FFA/FFA.c"],
include_dirs=include_dirs
),
Extension(
name="FBLS_cext",
sources=["FFA/FBLS_cext.pyx","FFA/FBLS.c"],
include_dirs=include_dirs
),
Extension(
name="BLS_cext",
sources=["FFA/BLS_cext.pyx","FFA/BLS.c"],
include_dirs=include_dirs
),
Extension(
name="fold",
sources=["FFA/fold.pyx"],
include_dirs=include_dirs),
]
ext_transit = [
Extension(
name = 'occultsmall',
sources = ['terra/transit/occultsmall.f']
)
]
if __name__ == "__main__":
# Cython extension
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name="terra",
ext_modules = ext_ffa,
cmdclass = {'build_ext': build_ext},
)
# Use numpy to run f2py
from numpy.distutils.core import setup
setup(
name="terra",
author="Erik Petigura",
author_email="epetigura@berkeley.edu",
packages=["terra"],
ext_modules = ext_transit,
description="Pipeline to search for transiting planets.",
)