-
Notifications
You must be signed in to change notification settings - Fork 16
/
setup.py
executable file
·49 lines (40 loc) · 1.19 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
#!/usr/bin/env python
import os
import sys
from setuptools import setup, Extension
if os.environ.get('READTHEDOCS', None) == 'True':
# Skip installing the C extension on ReadTheDocs
extensions = []
packages = ["wobble"]
else:
import tensorflow as tf
compile_flags = tf.sysconfig.get_compile_flags()
link_flags = tf.sysconfig.get_link_flags()
compile_flags += ["-std=c++11"]
if sys.platform == "darwin":
compile_flags += ["-mmacosx-version-min=10.9"]
extensions = [
Extension(
"wobble.interp.interp_op",
sources=[
"wobble/interp/interp_op.cc",
"wobble/interp/interp_rev_op.cc",
],
include_dirs=["wobble/interp"],
language="c++",
extra_compile_args=compile_flags,
extra_link_args=link_flags,
),
]
packages = ["wobble", "wobble.interp"]
setup(
name="wobble",
version="0.0.1",
license="MIT",
author="Megan Bedell",
author_email="mbedell@flatironinstitute.org",
description="precise radial velocities with tellurics",
packages=packages,
ext_modules=extensions,
zip_safe=True,
)