summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-03-01 10:03:38 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-03-01 10:03:38 +0100
commit440b4000e3674df074c51a65db6c034823e67a8d (patch)
tree31328058c28a20bd1456a6b9afbf6be3abfc3289 /scripts
parent86218a2f51f5a5890a9be872d58610b3260e23a4 (diff)
downloadqutebrowser-440b4000e3674df074c51a65db6c034823e67a8d.tar.gz
qutebrowser-440b4000e3674df074c51a65db6c034823e67a8d.zip
scripts: Fix recompile_requirements with == in env marker
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dev/recompile_requirements.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index 8fd23b3f2..cafb393aa 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -374,10 +374,12 @@ def parse_versioned_line(line):
if '==' in line:
if line[0] == '#': # ignored dependency
line = line[1:].strip()
- line = line.rsplit('#', maxsplit=1)[0] # Strip comments
+
+ # Strip comments and pip environment markers
+ line = line.rsplit('#', maxsplit=1)[0]
+ line = line.split(';')[0].strip()
+
name, version = line.split('==')
- if ';' in version: # pip environment markers
- version = version.split(';')[0].strip()
elif line.startswith('-e'):
rest, name = line.split('#egg=')
version = rest.split('@')[1][:7]