eris/install-tools

24 lines
685 B
Text
Raw Normal View History

#!/usr/bin/env python3.7
2015-12-26 20:52:39 +00:00
2019-02-04 11:48:47 +10:00
# Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved.
2017-06-01 01:03:39 +01:00
# Licensed under the Artistic License 2.0.
2015-12-26 20:52:39 +00:00
import subprocess
2018-09-17 23:59:38 +10:00
import eris.tools
2015-12-26 20:52:39 +00:00
pip_deps, dist_deps = set(), set()
2018-09-17 23:59:38 +10:00
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:
2018-03-24 16:34:49 +10:00
subprocess.run(["sudo", "apt-get", "-y", "install"] + list(dist_deps),
check=True)
if pip_deps:
2018-09-17 23:59:38 +10:00
subprocess.run(["python" + eris.tools.PYTHON_VERSION, "-m", "pip",
"install"] + list(pip_deps), check=True)