23 lines
685 B
Python
Executable file
23 lines
685 B
Python
Executable file
#!/usr/bin/env python3.7
|
|
|
|
# Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved.
|
|
# Licensed under the Artistic License 2.0.
|
|
|
|
|
|
import subprocess
|
|
import eris.tools
|
|
|
|
|
|
pip_deps, dist_deps = set(), set()
|
|
for dependency in eris.tools.dependencies():
|
|
if "/" in dependency:
|
|
pip_version, pip_dependency = dependency.split("/")
|
|
pip_deps.add(pip_dependency)
|
|
else:
|
|
dist_deps.add(dependency)
|
|
if dist_deps:
|
|
subprocess.run(["sudo", "apt-get", "-y", "install"] + list(dist_deps),
|
|
check=True)
|
|
if pip_deps:
|
|
subprocess.run(["python" + eris.tools.PYTHON_VERSION, "-m", "pip",
|
|
"install"] + list(pip_deps), check=True)
|