-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup.py
47 lines (40 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
"""
setup.py
"""
import shlex
from subprocess import check_call
from warnings import warn
from setuptools import setup
from setuptools.command.develop import develop
class PostDevelopCommand(develop):
"""
Class to run post setup commands
"""
def run(self):
"""
Run method that tries to install pre-commit hooks
"""
try:
check_call(shlex.split("pre-commit install"))
except Exception as e:
warn("Unable to run 'pre-commit install': {}"
.format(e))
develop.run(self)
setup(
entry_points={
"console_scripts": ["sup3r=sup3r.cli:main",
"sup3r-pipeline=sup3r.pipeline.pipeline_cli:main",
"sup3r-batch=sup3r.batch.batch_cli:main",
"sup3r-qa=sup3r.qa.qa_cli:main",
"sup3r-bias-calc=sup3r.bias.bias_calc_cli:main",
"sup3r-solar=sup3r.solar.solar_cli:main",
("sup3r-forward-pass=sup3r.pipeline."
"forward_pass_cli:main"),
("sup3r-collect=sup3r.postprocessing."
"data_collect_cli:main"),
],
},
package_data={'sup3r': ['postprocessing/writers/*.json']},
test_suite="tests",
cmdclass={"develop": PostDevelopCommand},
)