-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
executable file
·28 lines (22 loc) · 1002 Bytes
/
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
from subprocess import run
import pathlib
from venv import create
from os.path import abspath
def create_norec_env(current_path):
venv_dir = "{cpath}/NOREC4DNA/venv".format(cpath=current_path)
create(venv_dir, with_pip=True)
def install_norec_packages(current_path):
run(["venv/bin/pip", "install", "wheel"], cwd="{cpath}/NOREC4DNA".format(cpath=current_path))
run(["venv/bin/pip", "install", "-r", abspath("./NOREC_requirements.txt")], cwd="{cpath}/NOREC4DNA".format(cpath=current_path)) #"./NOREC_requirements.txt"
def compile_dna_aeon(current_path):
run(["cmake", current_path])
run(["cmake", "--build", current_path])
if __name__ == "__main__":
cpath = pathlib.Path(__file__).parent.resolve()
print("Setting up NOREC4DNA virtual environment.")
create_norec_env(cpath)
print("Installing packages required for NOREC4DNA.")
install_norec_packages(cpath)
print("Compiling DNA Aeon")
compile_dna_aeon(cpath)
print("Installation finished!")