From 130a0b5d089f5f3e971e4b06598ce3f236472327 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 4 Jan 2020 21:16:05 +0100 Subject: Pin older jaraco.functools with Python 3.5 3.0.0 needs Python 3.6 or higher --- misc/requirements/requirements-tests.txt | 3 ++- misc/requirements/requirements-tests.txt-raw | 2 ++ scripts/dev/recompile_requirements.py | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3-54-g00ecf