From 48ec9943802de47beda12948d6459f48714f0ff5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 4 Jan 2020 20:15:05 +0100 Subject: 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). --- scripts/dev/recompile_requirements.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-54-g00ecf