summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-01-04 21:16:05 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-01-04 22:05:27 +0100
commit130a0b5d089f5f3e971e4b06598ce3f236472327 (patch)
treee3697582e7c678cc43cb5343e95fcfe5fa69a5d7
parent3a9c0121ddb4ae01bc544cefa799b1f43a94c433 (diff)
downloadqutebrowser-130a0b5d089f5f3e971e4b06598ce3f236472327.tar.gz
qutebrowser-130a0b5d089f5f3e971e4b06598ce3f236472327.zip
Pin older jaraco.functools with Python 3.5
3.0.0 needs Python 3.6 or higher
-rw-r--r--misc/requirements/requirements-tests.txt3
-rw-r--r--misc/requirements/requirements-tests.txt-raw2
-rw-r--r--scripts/dev/recompile_requirements.py15
3 files changed, 19 insertions, 1 deletions
diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt
index bb78d58d7..ec7184f2a 100644
--- a/misc/requirements/requirements-tests.txt
+++ b/misc/requirements/requirements-tests.txt
@@ -12,7 +12,7 @@ glob2==0.7
hunter==3.0.5 # rq.filter: != 3.1.0
hypothesis==5.1.0
itsdangerous==1.1.0
-jaraco.functools==3.0.0
+jaraco.functools==3.0.0 ; python_version>="3.6"
# Jinja2==2.10.3
Mako==1.1.0
manhole==1.6.0
@@ -43,3 +43,4 @@ soupsieve==1.9.5
vulture==1.2
wcwidth==0.1.8
Werkzeug==0.16.0
+jaraco.functools==2.0; python_version<"3.6" # rq.filter: <= 2.0
diff --git a/misc/requirements/requirements-tests.txt-raw b/misc/requirements/requirements-tests.txt-raw
index 8eedd7bf7..feba4d05e 100644
--- a/misc/requirements/requirements-tests.txt-raw
+++ b/misc/requirements/requirements-tests.txt-raw
@@ -18,4 +18,6 @@ pytest-xvfb
vulture
#@ filter: hunter != 3.1.0
+#@ markers: jaraco.functools python_version>="3.6"
+#@ add: jaraco.functools==2.0; python_version<"3.6" # rq.filter: <= 2.0
#@ ignore: Jinja2, MarkupSafe, colorama
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index 9b181f986..5398f7800 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -57,6 +57,11 @@ def convert_line(line, comments):
except KeyError:
pass
+ try:
+ line += ' ; {}'.format(comments['markers'][pkgname])
+ except KeyError:
+ pass
+
return line
@@ -71,8 +76,10 @@ def read_comments(fobj):
"""
comments = {
'filter': {},
+ 'markers': {},
'comment': {},
'ignore': [],
+ 'add': [],
'replace': {},
}
for line in fobj:
@@ -91,6 +98,11 @@ def read_comments(fobj):
elif command == 'replace':
pattern, replacement = args.split(' ', maxsplit=1)
comments['replace'][pattern] = replacement
+ elif command == 'markers':
+ pkg, markers = args.split(' ', maxsplit=1)
+ comments['markers'][pkg] = markers
+ elif command == 'add':
+ comments['add'].append(args)
return comments
@@ -148,6 +160,9 @@ def main():
continue
f.write(convert_line(line, comments) + '\n')
+ for line in comments['add']:
+ f.write(line + '\n')
+
if __name__ == '__main__':
main()