diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-03-04 15:04:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-03-04 15:04:29 +0000 |
commit | db009d021fe4053a5438f97675b68d540b3fb9ec (patch) | |
tree | 21d30e8ede2a78657c56937a508f97b828ed7c9d /bin/vendor-licenses | |
parent | Adding upstream version 1.5.14. (diff) | |
download | identify-db009d021fe4053a5438f97675b68d540b3fb9ec.tar.xz identify-db009d021fe4053a5438f97675b68d540b3fb9ec.zip |
Adding upstream version 2.1.0.upstream/2.1.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/vendor-licenses')
-rwxr-xr-x | bin/vendor-licenses | 12 |
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__': |