summaryrefslogtreecommitdiff
path: root/scripts/dev/recompile_requirements.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dev/recompile_requirements.py')
-rw-r--r--scripts/dev/recompile_requirements.py15
1 files changed, 15 insertions, 0 deletions
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()