tools: Not detecting the type of python files. Assuming python3.

- 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.
This commit is contained in:
Andrew Hamilton 2019-01-21 11:46:51 +10:00
parent 7d412ec8f1
commit 85a5840cff
17 changed files with 53 additions and 140 deletions

View file

@ -8,21 +8,16 @@ import subprocess
import eris.tools
pip_deps, pip3_deps, dist_deps = set(), set(), set()
pip_deps, dist_deps = set(), set()
for dependency in eris.tools.dependencies():
if "/" in dependency:
pip_version, pip_dependency = dependency.split("/")
(pip_deps if pip_version == "pip" else pip3_deps).add(pip_dependency)
pip_deps.add(pip_dependency)
else:
dist_deps.add(dependency)
if pip_deps:
dist_deps.add("python-pip")
if dist_deps:
subprocess.run(["sudo", "apt-get", "-y", "install"] + list(dist_deps),
check=True)
if pip_deps:
subprocess.run(["python", "-m", "pip", "install"] + list(pip_deps),
check=True)
if pip3_deps:
subprocess.run(["python" + eris.tools.PYTHON_VERSION, "-m", "pip",
"install"] + list(pip3_deps), check=True)
"install"] + list(pip_deps), check=True)