summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-04-06 16:08:28 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-04-06 16:31:48 +0200
commite5014f9c09c6cfebba4f4a7e1828e7b9328ec15d (patch)
treedece0d19a415e7a6d56e6ab3f603ca3ed29e99df
parent0e1a018d4ab881726bc53c5aaab5c0af35dd0330 (diff)
downloadqutebrowser-e5014f9c09c6cfebba4f4a7e1828e7b9328ec15d.tar.gz
qutebrowser-e5014f9c09c6cfebba4f4a7e1828e7b9328ec15d.zip
Fix lint
(cherry picked from commit 5371dccbe9745f74cdc1865d0f0eea26867ee89c)
-rw-r--r--scripts/dev/recompile_requirements.py9
1 files 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