summaryrefslogtreecommitdiffstats
path: root/bin/vendor-licenses
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-04 15:04:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-04 15:04:39 +0000
commit9143c0beda96a82579dc6ca87cba5ba74b907dea (patch)
tree79e9ef1de7f0919c55bcaad00f0d3b110b1ce371 /bin/vendor-licenses
parentReleasing debian version 1.5.14-1. (diff)
downloadidentify-9143c0beda96a82579dc6ca87cba5ba74b907dea.tar.xz
identify-9143c0beda96a82579dc6ca87cba5ba74b907dea.zip
Merging upstream version 2.1.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/vendor-licenses')
-rwxr-xr-xbin/vendor-licenses12
1 files changed, 3 insertions, 9 deletions
diff --git a/bin/vendor-licenses b/bin/vendor-licenses
index 83c0c4e..2dbde36 100755
--- a/bin/vendor-licenses
+++ b/bin/vendor-licenses
@@ -1,19 +1,15 @@
#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
"""Usage:
./bin/vendor-licenses > identify/vendor/licenses.py
"""
-from __future__ import absolute_import
-from __future__ import unicode_literals
-
import argparse
import os.path
import subprocess
import tempfile
-def main():
+def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument('--revision', default='HEAD')
args = parser.parse_args()
@@ -45,18 +41,16 @@ def main():
licenses.append((spdx, license_text))
- print('# -*- coding: utf-8 -*-')
- print('from __future__ import absolute_import')
- print('from __future__ import unicode_literals')
print('LICENSES = (')
for spdx, text in sorted(licenses):
print(' (')
- print(' {!r},'.format(spdx))
+ print(f' {spdx!r},')
print(" '''\\")
print(text.replace('\t', ' ').replace(' \n', '').strip())
print("''',")
print(' ),')
print(')')
+ return 0
if __name__ == '__main__':