-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
51 lines (43 loc) · 1.3 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
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
from setuptools import dist
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
desc = open("README.rst").read()
# install numpy so we can import it before calling setup
# https://luminousmen.com/post/resolve-cython-and-numpy-dependencies
dist.Distribution().fetch_build_eggs(['numpy'])
import numpy
include_dirs = [
"acor",
numpy.get_include(),
]
acor = Extension("acor._acor", ["acor/_acor.c", "acor/acor.c"],
include_dirs=include_dirs)
setup(
name="acor",
version="1.1.1",
author="Daniel Foreman-Mackey and Jonathan Goodman",
author_email="[email protected]",
packages=["acor"],
url="http://github.com/dfm/chimaerase",
license="MIT",
description="Estimate the autocorrelation time of a time series quickly.",
long_description=desc,
install_requires=["numpy"],
ext_modules=[acor],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
],
)