forked from cta-observatory/cta-lstchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (61 loc) · 1.87 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
67
68
69
70
71
72
#!/usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# import sys
from setuptools import setup, find_packages
import os
import sys
# Add lstchain folder to path (contains version.py)
# this is needed as lstchain/__init__.py imports dependencies
# that might not be installed before setup runs, so we cannot import
# lstchain.version
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'lstchain'))
from version import get_version, update_release_version # noqa
update_release_version()
version = get_version()
def find_scripts(script_dir, prefix):
script_list = [
os.path.splitext(f)[0]
for f in os.listdir(script_dir) if f.startswith(prefix)
]
script_dir = script_dir.replace('/', '.')
point_list = []
for f in script_list:
point_list.append(f"{f} = {script_dir}.{f}:main")
return point_list
lstchain_list = find_scripts('lstchain/scripts', 'lstchain_')
onsite_list = find_scripts('lstchain/scripts/onsite', 'onsite_')
tools_list = find_scripts('lstchain/tools', 'lstchain_')
entry_points = {}
entry_points['console_scripts'] = lstchain_list + onsite_list + tools_list
setup(
version=version,
packages=find_packages(),
install_requires=[
"astropy~=4.0,>=4.0.2",
'ctapipe~=0.8.0',
'ctaplot~=0.5.3',
"eventio>=1.1.1,<2.0.0a0", # at least 1.1.1, but not 2
'gammapy>=0.17',
'h5py',
'joblib',
'matplotlib',
'numba',
'numpy',
'pandas',
'pyirf~=0.3.0',
'scipy',
'seaborn',
'scikit-learn',
'tables',
'traitlets',
],
package_data={
'lstchain': ['data/lstchain_standard_config.json',
'resources/LST_pixid_to_cluster.txt'],
},
tests_require=[
'pytest',
'pytest-ordering',
],
entry_points=entry_points
)