summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-01-04 20:15:05 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-01-04 21:57:08 +0100
commit48ec9943802de47beda12948d6459f48714f0ff5 (patch)
treedcf1c860f70491b87c32a4ec11b81788edcf5f34
parent5c35d98b13d8723f81d27dd3342d85c2b768eb7c (diff)
downloadqutebrowser-48ec9943802de47beda12948d6459f48714f0ff5.tar.gz
qutebrowser-48ec9943802de47beda12948d6459f48714f0ff5.zip
recompile_requirements: Use python3.7 for some environments
Old PyQt versions need sip < 5 which doesn't work with Python 3.8. pylint doesn't install typed_ast with Python 3.8 (as the builtin ast module suffices).
-rw-r--r--scripts/dev/recompile_requirements.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index 74040814d..125ebed9f 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -114,7 +114,15 @@ def main():
else:
outfile = os.path.join(REQ_DIR, 'requirements-{}.txt'.format(name))
- host_python = sys.executable
+ if name in [
+ # Need sip v4 which doesn't work on Python 3.8
+ 'pyqt-5.7', 'pyqt-5.9', 'pyqt-5.10', 'pyqt-5.11', 'pyqt-5.12',
+ # Installs typed_ast on < 3.8 only
+ 'pylint',
+ ]:
+ host_python = 'python3.7'
+ else:
+ host_python = sys.executable
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.run([host_python, '-m', 'venv', tmpdir], check=True)