summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/dev/recompile_requirements.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index 125ebed9f..c2bb8ee22 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -127,10 +127,14 @@ def main():
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.run([host_python, '-m', 'venv', tmpdir], check=True)
- pip_bin = os.path.join(tmpdir, 'bin', 'pip')
- subprocess.run([pip_bin, 'install', '-r', filename], check=True)
- proc = subprocess.run([pip_bin, 'freeze'], check=True,
- stdout=subprocess.PIPE)
+ venv_python = os.path.join(tmpdir, 'bin', 'python')
+ subprocess.run([venv_python, '-m', 'pip',
+ 'install', '-U', 'pip'], check=True)
+
+ subprocess.run([venv_python, '-m', 'pip',
+ 'install', '-r', filename], check=True)
+ proc = subprocess.run([venv_python, '-m', 'pip', 'freeze'],
+ check=True, stdout=subprocess.PIPE)
reqs = proc.stdout.decode('utf-8')
with open(filename, 'r', encoding='utf-8') as f: