From e5014f9c09c6cfebba4f4a7e1828e7b9328ec15d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 6 Apr 2020 16:08:28 +0200 Subject: Fix lint (cherry picked from commit 5371dccbe9745f74cdc1865d0f0eea26867ee89c) --- scripts/dev/recompile_requirements.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py index db3d0dd2a..ecd7dd153 100644 --- a/scripts/dev/recompile_requirements.py +++ b/scripts/dev/recompile_requirements.py @@ -113,15 +113,16 @@ def get_all_names(): yield basename[len('requirements-'):-len('.txt-raw')] -def init_venv(host_python, tmpdir, filename): - subprocess.run([host_python, '-m', 'venv', tmpdir], check=True) +def init_venv(host_python, venv_dir, requirements): + """Initialize a new virtualenv and install the given packages.""" + subprocess.run([host_python, '-m', 'venv', venv_dir], check=True) - venv_python = os.path.join(tmpdir, 'bin', 'python') + venv_python = os.path.join(venv_dir, 'bin', 'python') subprocess.run([venv_python, '-m', 'pip', 'install', '-U', 'pip'], check=True) subprocess.run([venv_python, '-m', 'pip', - 'install', '-r', filename], check=True) + 'install', '-r', requirements], check=True) subprocess.run([venv_python, '-m', 'pip', 'check'], check=True) return venv_python -- cgit v1.2.3-54-g00ecf