X Tutup
Skip to content

Commit 0867dbe

Browse files
committed
Create tools/requirements.py
1 parent 6fdadb4 commit 0867dbe

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tools/requirements.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""
2+
Installs Python dependencies using the pip tool.
3+
See the requirements.txt file.
4+
pip install --upgrade -r ../tools/requirements.txt
5+
"""
6+
7+
from common import *
8+
import subprocess
9+
10+
11+
def main():
12+
args = []
13+
if sys.executable.startswith("/usr/"):
14+
args.append("sudo")
15+
requirements = os.path.join(TOOLS_DIR, "requirements.txt")
16+
args.extend(["pip", "install", "--upgrade", "-r", requirements])
17+
retcode = subprocess.call(args)
18+
sys.exit(retcode)
19+
20+
21+
if __name__ == "__main__":
22+
main()

0 commit comments

Comments
 (0)
X Tutup