- Also now not using any tools that depend on python2. - Simplifies installation. - Personally not using python2. - Eris is not used widely enough to justify supporting python2 files. - The way of determining whether a source file was python2 or python3 was not very good.
23 lines
680 B
Python
Executable file
23 lines
680 B
Python
Executable file
#!/usr/bin/env python3.7
|
|
|
|
# Copyright (C) 2018 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)
|