Adding upstream version 2.1.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c3f707bfbc
commit
085459798b
14 changed files with 132 additions and 104 deletions
|
@ -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__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue