From 5c35d98b13d8723f81d27dd3342d85c2b768eb7c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 4 Jan 2020 20:13:48 +0100 Subject: recompile_requirements: Use python -m venv --- scripts/dev/recompile_requirements.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index e4aa6229b..74040814d 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -114,9 +114,12 @@ def main(): else: outfile = os.path.join(REQ_DIR, 'requirements-{}.txt'.format(name)) + host_python = sys.executable + with tempfile.TemporaryDirectory() as tmpdir: + subprocess.run([host_python, '-m', 'venv', tmpdir], check=True) + pip_bin = os.path.join(tmpdir, 'bin', 'pip') - subprocess.run(['virtualenv', tmpdir], check=True) subprocess.run([pip_bin, 'install', '-r', filename], check=True) proc = subprocess.run([pip_bin, 'freeze'], check=True, stdout=subprocess.PIPE) -- cgit v1.2.3-54-g00ecf