eris/install-tools
Andrew Hamilton 1cf2fc445c Revert "Move to python3.8.0"
This reverts commit 04fb17cb3f.
- Am seeing a bug where only one worker continues processing
  on python3.8.
- Ubuntu and freedesktop-sdk are still on 3.7.
- Not using any features of 3.8 yet.
- Also removes color from mypy.
2019-12-19 14:47:00 +10:00

36 lines
1.2 KiB
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, go_deps, luarocks_deps, dist_deps, git_deps = set(), set(), set(), \
set(), set()
dep_types = {"pip": pip_deps, "go": go_deps, "luarocks": luarocks_deps,
"git": git_deps}
for dependency in eris.tools.dependencies():
if "/" in dependency:
dep_type, dep = dependency.split("/", maxsplit=1)
dep_types[dep_type].add(dep)
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)
if go_deps:
subprocess.run(["sudo", "apt-get", "-y", "install", "golang-go"],
check=True)
subprocess.run(["go", "get"] + list(go_deps), check=True)
if luarocks_deps:
subprocess.run(["sudo", "apt-get", "-y", "install", "luarocks",
"liblua5.3-dev"], check=True)
subprocess.run(["sudo", "luarocks", "install"] + list(luarocks_deps),
check=True)