-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.py
More file actions
executable file
·43 lines (31 loc) · 831 Bytes
/
install.py
File metadata and controls
executable file
·43 lines (31 loc) · 831 Bytes
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
#!/usr/bin/env python3
""" Install
TODO
Parameters
----------
TODO
Returns
-------
TODO
"""
import sys
import platform
import subprocess
print("Start installation process")
subprocess.run([sys.executable, "-m", "venv", "crypto_env" ], check=True)
if platform.system() == "Linux":
subprocess.run(["crypto_env/bin/pip3", "install", "-r", "linux_requirements.txt"], check=True)
native_libs = [
"native_tools",
"openssl_api"
]
for lib in native_libs:
subprocess.run(["make", "-C", f"crypto_native/{lib}", "all", "clean"], check=True)
elif platform.system() == "Windows":
subprocess.run([
"crypto_env/Scripts/pip.exe", "install", "-r", "windows_requirements.txt"
], check=True)
else:
print("Error: Unknown platform")
sys.exit(1)
print("Installation finished")