-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBootstrapEpilog.py
More file actions
45 lines (39 loc) · 1.2 KB
/
BootstrapEpilog.py
File metadata and controls
45 lines (39 loc) · 1.2 KB
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
# ----------------------------------------------------------------------
# |
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
# | Distributed under the MIT License.
# |
# ----------------------------------------------------------------------
# pylint: disable=missing-module-docstring
import subprocess
import sys
# Parse the arguments
is_debug = False
is_force = False
is_verbose = False
is_package = False
no_cache = False
# First arg is the script name, second arg is the name of the shell script to write to
for arg in sys.argv[2:]:
if arg == "--debug":
is_debug = True
elif arg == "--force":
is_force = True
elif arg == "--verbose":
is_verbose = True
elif arg == "--package":
is_package = True
elif arg == "--no-cache":
no_cache = True
else:
raise Exception("'{}' is not a recognized argument.".format(arg))
if is_debug:
is_verbose = True
subprocess.run(
'pip install --disable-pip-version-check {} --editable ".[dev{}]"'.format(
"--no-cache-dir" if no_cache else "",
", package" if is_package else "",
),
check=True,
shell=True,
)