-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsetup.py
66 lines (57 loc) · 2.28 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
#!/usr/bin/env python3
import site
from setuptools import setup, Extension
import numpy as np
# import imp
# PEP 517 Workaround for edittable user installs
site.ENABLE_USER_SITE = True
# version = imp.load_source('afterglowpy.version', 'afterglowpy/version.py')
version = {}
with open("afterglowpy/version.py", "r") as f:
exec(f.read(), version)
with open("README.md", "r") as f:
long_description = f.read()
inc = [np.get_include()]
libs = []
libdirs = []
jetsources = ["afterglowpy/jetmodule.c", "afterglowpy/offaxis_struct_funcs.c",
"afterglowpy/integrate.c", "afterglowpy/shockEvolution.c",
"afterglowpy/interval.c"]
jetdepends = ["afterglowpy/offaxis_struct_funcs.h",
"afterglowpy/shockEvolution.h", "afterglowpy/interval.h"]
shocksources = ["afterglowpy/shockmodule.c", "afterglowpy/shockEvolution.c"]
shockdepends = ["afterglowpy/shockEvolution.h",
"afterglowpy/offaxis_struct_funcs.h"]
jetmodule = Extension('afterglowpy.jet', sources=jetsources, include_dirs=inc,
depends=jetdepends, extra_compile_args=['-Wall'])
shockmodule = Extension('afterglowpy.shock', sources=shocksources,
include_dirs=inc, depends=shockdepends,
extra_compile_args=['-Wall'])
setup(
name='afterglowpy',
version=version['__version__'],
author="Geoffrey Ryan",
author_email="[email protected]",
description='GRB Afterglow Models',
long_description=long_description,
long_description_content_type='text/markdown',
license='MIT',
url='https://github.com/geoffryan/afterglowpy',
packages=['afterglowpy'],
ext_modules=[jetmodule, shockmodule],
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: C",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy"],
install_requires=['numpy>=1.13', 'scipy>=0.14'],
extras_require={
'docs': ['numpydoc']
},
project_urls={
"Source Code": "https://github.com/geoffryan/afterglowpy",
"Documentation": "https://afterglowpy.readthedocs.io"}
)