Christoffer Jansson | 4e8a773 | 2022-02-08 08:01:12 | [diff] [blame] | 1 | #!/usr/bin/env vpython3 |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 2 | |
| 3 | # Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 4 | # |
| 5 | # Use of this source code is governed by a BSD-style license |
| 6 | # that can be found in the LICENSE file in the root of the source |
| 7 | # tree. An additional intellectual property rights grant can be found |
| 8 | # in the file PATENTS. All contributing project authors may |
| 9 | # be found in the AUTHORS file in the root of the source tree. |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 10 | """Generates license markdown for a prebuilt version of WebRTC. |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 11 | |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 12 | Licenses are taken from dependent libraries which are determined by |
| 13 | GN desc command `gn desc` on all targets specified via `--target` argument. |
| 14 | |
| 15 | One can see all dependencies by invoking this command: |
Christoffer Jansson | 4e8a773 | 2022-02-08 08:01:12 | [diff] [blame] | 16 | $ gn.py desc --all --format=json <out_directory> <target> | \ |
| 17 | vpython3 -m json.tool |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 18 | (see "deps" subarray) |
| 19 | |
| 20 | Libraries are mapped to licenses via LIB_TO_LICENSES_DICT dictionary. |
| 21 | |
| 22 | """ |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 23 | |
| 24 | import sys |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 25 | import argparse |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 26 | import json |
| 27 | import logging |
| 28 | import os |
| 29 | import re |
| 30 | import subprocess |
Christoffer Jansson | 4e8a773 | 2022-02-08 08:01:12 | [diff] [blame] | 31 | from html import escape |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 32 | |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 33 | # Third_party library to licences mapping. Keys are names of the libraries |
| 34 | # (right after the `third_party/` prefix) |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 35 | LIB_TO_LICENSES_DICT = { |
Mirko Bonadei | afe7217 | 2018-04-13 09:11:52 | [diff] [blame] | 36 | 'abseil-cpp': ['third_party/abseil-cpp/LICENSE'], |
Mirko Bonadei | d9b62d3 | 2019-03-29 08:51:04 | [diff] [blame] | 37 | 'android_sdk': ['third_party/android_sdk/LICENSE'], |
Prashanth Swaminathan | 9e639fa | 2023-06-02 22:52:10 | [diff] [blame] | 38 | 'android_toolchain': ['third_party/android_toolchain/NOTICE'], |
Mirko Bonadei | 8cc6695 | 2020-10-30 09:13:45 | [diff] [blame] | 39 | 'auto': [ |
| 40 | 'third_party/android_deps/libs/' |
| 41 | 'com_google_auto_service_auto_service/LICENSE' |
| 42 | ], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 43 | 'boringssl': ['third_party/boringssl/src/LICENSE'], |
Florent Castelli | b531ec0 | 2021-05-03 16:22:06 | [diff] [blame] | 44 | 'crc32c': ['third_party/crc32c/src/LICENSE'], |
Jeremy Leconte | e44a155 | 2023-06-01 09:07:22 | [diff] [blame] | 45 | 'cpu_features': ['third_party/cpu_features/src/LICENSE'], |
philipel | d44badf | 2022-07-04 08:44:14 | [diff] [blame] | 46 | 'dav1d': ['third_party/dav1d/LICENSE'], |
Mirko Bonadei | 8cc6695 | 2020-10-30 09:13:45 | [diff] [blame] | 47 | 'errorprone': [ |
| 48 | 'third_party/android_deps/libs/' |
| 49 | 'com_google_errorprone_error_prone_core/LICENSE' |
| 50 | ], |
Oleh Prypin | d42acbb | 2018-01-15 19:13:16 | [diff] [blame] | 51 | 'fiat': ['third_party/boringssl/src/third_party/fiat/LICENSE'], |
Peter Kotwicz | 625964f | 2020-11-29 01:35:44 | [diff] [blame] | 52 | 'guava': ['third_party/android_deps/libs/com_google_guava_guava/LICENSE'], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 53 | 'ijar': ['third_party/ijar/LICENSE'], |
| 54 | 'jsoncpp': ['third_party/jsoncpp/LICENSE'], |
Danil Chapovalov | c46385c | 2020-03-11 09:45:57 | [diff] [blame] | 55 | 'libaom': ['third_party/libaom/source/libaom/LICENSE'], |
Björn Terelius | 51f6a20 | 2023-08-09 15:34:14 | [diff] [blame] | 56 | 'libc++': ['third_party/libc++/src/LICENSE.TXT'], |
| 57 | 'libc++abi': ['third_party/libc++abi/src/LICENSE.TXT'], |
Byoungchan Lee | d69a726 | 2022-06-23 13:06:00 | [diff] [blame] | 58 | 'libevent': ['third_party/libevent/LICENSE'], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 59 | 'libjpeg_turbo': ['third_party/libjpeg_turbo/LICENSE.md'], |
| 60 | 'libsrtp': ['third_party/libsrtp/LICENSE'], |
Björn Terelius | 51f6a20 | 2023-08-09 15:34:14 | [diff] [blame] | 61 | 'libunwind': ['third_party/libunwind/src/LICENSE.TXT'], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 62 | 'libvpx': ['third_party/libvpx/source/libvpx/LICENSE'], |
| 63 | 'libyuv': ['third_party/libyuv/LICENSE'], |
Mirko Bonadei | b6f35a3 | 2020-04-01 17:41:00 | [diff] [blame] | 64 | 'nasm': ['third_party/nasm/LICENSE'], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 65 | 'opus': ['third_party/opus/src/COPYING'], |
Alessio Bazzica | ffb8c8c | 2019-04-01 08:19:25 | [diff] [blame] | 66 | 'pffft': ['third_party/pffft/LICENSE'], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 67 | 'protobuf': ['third_party/protobuf/LICENSE'], |
Alessio Bazzica | a5b9038 | 2018-05-07 09:29:54 | [diff] [blame] | 68 | 'rnnoise': ['third_party/rnnoise/COPYING'], |
Artem Titov | 2983599 | 2018-08-07 09:50:54 | [diff] [blame] | 69 | 'webrtc': ['LICENSE'], |
Mirko Bonadei | fe48ee9 | 2018-03-20 15:43:23 | [diff] [blame] | 70 | 'zlib': ['third_party/zlib/LICENSE'], |
Artem Titov | a76af0c | 2018-07-23 15:38:12 | [diff] [blame] | 71 | 'base64': ['rtc_base/third_party/base64/LICENSE'], |
Artem Titov | e41c433 | 2018-07-25 13:04:28 | [diff] [blame] | 72 | 'sigslot': ['rtc_base/third_party/sigslot/LICENSE'], |
Artem Titov | 8ff433a | 2018-07-24 11:42:22 | [diff] [blame] | 73 | 'portaudio': ['modules/third_party/portaudio/LICENSE'], |
Artem Titov | 8a838fd | 2018-07-24 13:37:09 | [diff] [blame] | 74 | 'fft': ['modules/third_party/fft/LICENSE'], |
Artem Titov | e095b81 | 2018-07-25 10:10:22 | [diff] [blame] | 75 | 'g711': ['modules/third_party/g711/LICENSE'], |
Artem Titov | 52b9000 | 2018-07-25 11:13:44 | [diff] [blame] | 76 | 'g722': ['modules/third_party/g722/LICENSE'], |
Mirko Bonadei | f0d64a5 | 2020-04-17 10:25:19 | [diff] [blame] | 77 | 'ooura': ['common_audio/third_party/ooura/LICENSE'], |
Artem Titov | 2983599 | 2018-08-07 09:50:54 | [diff] [blame] | 78 | 'spl_sqrt_floor': ['common_audio/third_party/spl_sqrt_floor/LICENSE'], |
Mirko Bonadei | cd3e1d0 | 2023-02-08 09:43:13 | [diff] [blame] | 79 | 'kotlin_stdlib': ['third_party/kotlin_stdlib/LICENSE'], |
Manashi Sarkar | 91a7beb | 2023-12-05 15:53:50 | [diff] [blame] | 80 | 'jni_zero': ['third_party/jni_zero/LICENSE'], |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 81 | 'protobuf-javascript': ['third_party/protobuf-javascript/LICENSE'], |
Evan Shrubsole | cd09858 | 2024-04-30 07:57:49 | [diff] [blame] | 82 | 'perfetto': ['third_party/perfetto/LICENSE'], |
Yves Gerey | 3f75209 | 2019-11-27 17:10:17 | [diff] [blame] | 83 | # TODO(bugs.webrtc.org/1110): Remove this hack. This is not a lib. |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 84 | # For some reason it is listed as so in _get_third_party_libraries. |
Yves Gerey | 3f75209 | 2019-11-27 17:10:17 | [diff] [blame] | 85 | 'android_deps': [], |
Mirko Bonadei | 7e225cf | 2021-02-09 09:37:52 | [diff] [blame] | 86 | # This is not a library but a collection of libraries. |
| 87 | 'androidx': [], |
Yves Gerey | 3f75209 | 2019-11-27 17:10:17 | [diff] [blame] | 88 | |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 89 | # Compile time dependencies, no license needed: |
Yura Yaroshevich | 29c36b2 | 2018-06-12 16:59:02 | [diff] [blame] | 90 | 'ow2_asm': [], |
Mirko Bonadei | 447cd3e | 2020-06-03 19:53:28 | [diff] [blame] | 91 | 'jdk': [], |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 92 | } |
| 93 | |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 94 | # Third_party library _regex_ to licences mapping. Keys are regular expression |
| 95 | # with names of the libraries (right after the `third_party/` prefix) |
| 96 | LIB_REGEX_TO_LICENSES_DICT = { |
| 97 | 'android_deps:android_support_annotations.*': [ |
| 98 | 'third_party/android_deps/libs/' + |
| 99 | 'com_android_support_support_annotations/LICENSE' |
| 100 | ], |
| 101 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 102 | # Internal dependencies, licenses are already included by other deps. |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 103 | 'android_deps:com_android_support_support_annotations.*': [], |
| 104 | } |
| 105 | |
| 106 | |
hanpfei | edbaf57 | 2022-04-20 02:14:45 | [diff] [blame] | 107 | SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) |
Mirko Bonadei | d866544 | 2018-09-04 10:17:27 | [diff] [blame] | 108 | WEBRTC_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir)) |
hanpfei | edbaf57 | 2022-04-20 02:14:45 | [diff] [blame] | 109 | SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR)) |
Alex Cooper | 813177d | 2022-08-31 17:55:37 | [diff] [blame] | 110 | |
| 111 | # Chromium, and potentially other repositories, embed us in the location |
| 112 | # "//third_party/webrtc". When this is the case, we expect that some of the |
| 113 | # tools we need are *actually* in their build folder, thus we need to move up |
| 114 | # to the *true* source root, when we're embedded like this. |
| 115 | if SRC_DIR.endswith(os.path.join('third_party', 'webrtc')): |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 116 | SRC_DIR = os.path.abspath(os.path.join(SRC_DIR, os.pardir, os.pardir)) |
Mirko Bonadei | d866544 | 2018-09-04 10:17:27 | [diff] [blame] | 117 | sys.path.append(os.path.join(SRC_DIR, 'build')) |
Henrik Kjellander | ec57e05 | 2017-10-17 19:36:01 | [diff] [blame] | 118 | import find_depot_tools |
| 119 | |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 120 | THIRD_PARTY_LIB_SIMPLE_NAME_REGEX = r'^.*/third_party/([\w\-+]+).*$' |
| 121 | THIRD_PARTY_LIB_REGEX_TEMPLATE = r'^.*/third_party/%s$' |
| 122 | |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 123 | |
Christoffer Jansson | 4e8a773 | 2022-02-08 08:01:12 | [diff] [blame] | 124 | class LicenseBuilder: |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 125 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 126 | def __init__(self, |
| 127 | buildfile_dirs, |
| 128 | targets, |
| 129 | lib_to_licenses_dict=None, |
| 130 | lib_regex_to_licenses_dict=None): |
| 131 | if lib_to_licenses_dict is None: |
| 132 | lib_to_licenses_dict = LIB_TO_LICENSES_DICT |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 133 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 134 | if lib_regex_to_licenses_dict is None: |
| 135 | lib_regex_to_licenses_dict = LIB_REGEX_TO_LICENSES_DICT |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 136 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 137 | self.buildfile_dirs = buildfile_dirs |
| 138 | self.targets = targets |
| 139 | self.lib_to_licenses_dict = lib_to_licenses_dict |
| 140 | self.lib_regex_to_licenses_dict = lib_regex_to_licenses_dict |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 141 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 142 | self.common_licenses_dict = self.lib_to_licenses_dict.copy() |
| 143 | self.common_licenses_dict.update(self.lib_regex_to_licenses_dict) |
| 144 | |
| 145 | @staticmethod |
| 146 | def _parse_library_name(dep): |
| 147 | """Returns library name after third_party |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 148 | |
| 149 | Input one of: |
| 150 | //a/b/third_party/libname:c |
| 151 | //a/b/third_party/libname:c(//d/e/f:g) |
| 152 | //a/b/third_party/libname/c:d(//e/f/g:h) |
| 153 | |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 154 | Outputs libname or None if this is not a third_party dependency. |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 155 | """ |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 156 | groups = re.match(THIRD_PARTY_LIB_SIMPLE_NAME_REGEX, dep) |
| 157 | return groups.group(1) if groups else None |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 158 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 159 | def _parse_library(self, dep): |
| 160 | """Return library simple or regex name matching `dep` after third_party |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 161 | |
| 162 | This method matches `dep` dependency against simple names in |
| 163 | LIB_TO_LICENSES_DICT and regular expression names in |
| 164 | LIB_REGEX_TO_LICENSES_DICT keys |
| 165 | |
| 166 | Outputs matched dict key or None if this is not a third_party dependency. |
| 167 | """ |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 168 | libname = LicenseBuilder._parse_library_name(dep) |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 169 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 170 | for lib_regex in self.lib_regex_to_licenses_dict: |
| 171 | if re.match(THIRD_PARTY_LIB_REGEX_TEMPLATE % lib_regex, dep): |
| 172 | return lib_regex |
Artem Titarenko | a971948 | 2018-12-11 16:00:04 | [diff] [blame] | 173 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 174 | return libname |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 175 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 176 | @staticmethod |
| 177 | def _run_gn(buildfile_dir, target): |
| 178 | cmd = [ |
| 179 | sys.executable, |
| 180 | os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'gn.py'), |
| 181 | 'desc', |
| 182 | '--all', |
| 183 | '--format=json', |
| 184 | os.path.abspath(buildfile_dir), |
| 185 | target, |
| 186 | ] |
| 187 | logging.debug('Running: %r', cmd) |
| 188 | output_json = subprocess.check_output(cmd, |
| 189 | cwd=WEBRTC_ROOT).decode('UTF-8') |
| 190 | logging.debug('Output: %s', output_json) |
| 191 | return output_json |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 192 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 193 | def _get_third_party_libraries(self, buildfile_dir, target): |
| 194 | output = json.loads(LicenseBuilder._run_gn(buildfile_dir, target)) |
| 195 | libraries = set() |
| 196 | for described_target in list(output.values()): |
| 197 | third_party_libs = (self._parse_library(dep) |
| 198 | for dep in described_target['deps']) |
| 199 | libraries |= set(lib for lib in third_party_libs if lib) |
| 200 | return libraries |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 201 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 202 | def generate_license_text(self, output_dir): |
| 203 | # Get a list of third_party libs from gn. For fat libraries we must |
| 204 | # consider all architectures, hence the multiple buildfile directories. |
| 205 | third_party_libs = set() |
| 206 | for buildfile in self.buildfile_dirs: |
| 207 | for target in self.targets: |
| 208 | third_party_libs |= self._get_third_party_libraries( |
| 209 | buildfile, target) |
| 210 | assert len(third_party_libs) > 0 |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 211 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 212 | missing_licenses = third_party_libs - set( |
| 213 | self.common_licenses_dict.keys()) |
| 214 | if missing_licenses: |
| 215 | error_msg = 'Missing licenses for third_party targets: %s' % \ |
| 216 | ', '.join(sorted(missing_licenses)) |
| 217 | logging.error(error_msg) |
| 218 | raise Exception(error_msg) |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 219 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 220 | # Put webrtc at the front of the list. |
| 221 | license_libs = sorted(third_party_libs) |
| 222 | license_libs.insert(0, 'webrtc') |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 223 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 224 | logging.info('List of licenses: %s', ', '.join(license_libs)) |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 225 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 226 | # Generate markdown. |
| 227 | output_license_file = open(os.path.join(output_dir, 'LICENSE.md'), |
| 228 | 'w+') |
| 229 | for license_lib in license_libs: |
| 230 | if len(self.common_licenses_dict[license_lib]) == 0: |
| 231 | logging.info( |
| 232 | 'Skipping compile time or internal dependency: %s', |
| 233 | license_lib) |
| 234 | continue # Compile time dependency |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 235 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 236 | output_license_file.write('# %s\n' % license_lib) |
| 237 | output_license_file.write('```\n') |
| 238 | for path in self.common_licenses_dict[license_lib]: |
| 239 | license_path = os.path.join(WEBRTC_ROOT, path) |
| 240 | with open(license_path, 'r') as license_file: |
| 241 | license_text = escape(license_file.read(), quote=True) |
| 242 | output_license_file.write(license_text) |
| 243 | output_license_file.write('\n') |
| 244 | output_license_file.write('```\n\n') |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 245 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 246 | output_license_file.close() |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 247 | |
| 248 | |
| 249 | def main(): |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 250 | parser = argparse.ArgumentParser(description='Generate WebRTC LICENSE.md') |
| 251 | parser.add_argument('--verbose', |
| 252 | action='store_true', |
| 253 | default=False, |
| 254 | help='Debug logging.') |
| 255 | parser.add_argument('--target', |
| 256 | required=True, |
| 257 | action='append', |
| 258 | default=[], |
| 259 | help='Name of the GN target to generate a license for') |
| 260 | parser.add_argument('output_dir', |
| 261 | help='Directory to output LICENSE.md to.') |
| 262 | parser.add_argument('buildfile_dirs', |
| 263 | nargs='+', |
| 264 | help='Directories containing gn generated ninja files') |
| 265 | args = parser.parse_args() |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 266 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 267 | logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO) |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 268 | |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 269 | builder = LicenseBuilder(args.buildfile_dirs, args.target) |
| 270 | builder.generate_license_text(args.output_dir) |
sakal | 67e414c | 2017-09-05 07:16:15 | [diff] [blame] | 271 | |
| 272 | |
| 273 | if __name__ == '__main__': |
Christoffer Dewerin | 81a9117 | 2024-04-08 07:26:41 | [diff] [blame] | 274 | sys.exit(main()) |