forked from lukeshingles/extinction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·54 lines (48 loc) · 1.39 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
#!/usr/bin/env python
import os
import re
import sys
import numpy
from setuptools import setup
from setuptools.extension import Extension
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering :: Astronomy",
"Intended Audience :: Science/Research",
]
# Synchronize version from code.
fname = "extinction.pyx"
version = re.findall(r"__version__ = \"(.*?)\"", open(fname).read())[0]
# Build Cython extension
source_files = [fname, os.path.join("extern", "bs.c")]
depends_files = [
os.path.join("extern", "bs.h"),
os.path.join("extern", "bsplines.pxi")
]
include_dirs = [numpy.get_include(), "extern"]
extensions = [
Extension(
"extinction",
source_files,
include_dirs=include_dirs,
depends=depends_files,
extra_compile_args=["-std=c11"],
)
]
setup(
name="extinction",
version=version,
description="Fast interstellar dust extinction laws",
long_description="documentation: http://extinction.readthedocs.io",
long_description_content_type="text/plain",
license="MIT",
classifiers=classifiers,
url="http://github.com/kbarbary/extinction",
author="Kyle Barbary",
author_email="[email protected]",
ext_modules=extensions,
install_requires=["numpy>=1.13.3"],
python_requires=">=3.6",
)