forked from AIT-WATCHMAN/sibyl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (52 loc) · 1.41 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
from setuptools import setup, Extension, find_packages
import os
from subprocess import check_output, CalledProcessError
VERSION = "0.2.2"
try:
RATROOT = os.environ["RATROOT"]
except OSError:
print(
"could not detect RATROOT. Make sure you have source 'ratpac.sh' before installing"
)
# Get RATPAC info
rat_incdir = os.path.join(RATROOT, "include")
rat_lib = "RATEvent"
rat_libdir = os.path.join(RATROOT, "lib")
# Get root info
try:
root_args = check_output(["root-config", "--cflags", "--libs"]).decode().split()
except CalledProcessError:
print(
"Error calling 'root-config'. Make sure you have source 'thisroot.sh' before installing"
)
extensions = [
Extension(
"fastrat",
["sibyl_cpp/fastrat.cpp"],
include_dirs=[rat_incdir],
libraries=[rat_lib],
library_dirs=[rat_libdir],
extra_compile_args=root_args,
)
]
setup(
name="sibyl",
version=VERSION,
author="Morgan Askins",
author_email="[email protected]",
scripts=["scripts/sibyl"],
packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
install_requires=[
"matplotlib",
"numpy",
"pyqt5",
"pyqtgraph",
"pyopengl",
"markdown",
],
install_package_data=True,
package_data={"sibyl": ["assets/*"]},
zip_safe=False,
ext_package="sibyl_cpp",
ext_modules=extensions,
)