forked from dfm/celerite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
53 lines (47 loc) · 1.52 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup, Extension
# Publish the library to PyPI.
if "publish" in sys.argv[-1]:
os.system("python setup.py sdist upload")
sys.exit()
# Default compile arguments.
ext = Extension("celerite.solver",
sources=[os.path.join("celerite", "solver.cpp")],
language="c++")
# Hackishly inject a constant into builtins to enable importing of the
# package before the library is built.
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins
builtins.__CELERITE_SETUP__ = True
import celerite # NOQA
from celerite.build import build_ext # NOQA
setup(
name="celerite",
version=celerite.__version__,
author="Daniel Foreman-Mackey",
author_email="foreman.mackey@gmail.com",
url="https://github.com/dfm/celerite",
license="MIT",
packages=["celerite"],
install_requires=["numpy", "pybind11"],
ext_modules=[ext],
description="Scalable 1D Gaussian Processes",
long_description=open("README.rst").read(),
package_data={"": ["README.rst", "LICENSE", "CITATION"]},
include_package_data=True,
cmdclass=dict(build_ext=build_ext),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
],
zip_safe=True,
)