Skip to content

Commit b44364e

Browse files
committed
Merge branch 'absolute_imports' into v2x_maintenance
2 parents 1126761 + a6f3b4e commit b44364e

File tree

17 files changed

+1625
-1468
lines changed

17 files changed

+1625
-1468
lines changed

about_code_tool/about.py

Lines changed: 61 additions & 466 deletions
Large diffs are not rendered by default.

about_code_tool/genabout.py

Lines changed: 257 additions & 347 deletions
Large diffs are not rendered by default.

about_code_tool/genattrib.py

Lines changed: 118 additions & 204 deletions
Large diffs are not rendered by default.

about_code_tool/help.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf8 -*-
3+
4+
# ============================================================================
5+
# Copyright (c) 2013-2015 nexB Inc. http://www.nexb.com/ - All rights reserved.
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ============================================================================
16+
17+
from __future__ import print_function
18+
19+
20+
__about_spec_version__ = '1.0'
21+
22+
__version__ = '2.2.0'
23+
24+
__copyright__ = """
25+
Copyright (c) 2013-2015 nexB Inc. All rights reserved.
26+
27+
Licensed under the Apache License, Version 2.0 (the "License");
28+
you may not use this file except in compliance with the License.
29+
You may obtain a copy of the License at
30+
31+
http://www.apache.org/licenses/LICENSE-2.0
32+
33+
Unless required by applicable law or agreed to in writing, software
34+
distributed under the License is distributed on an "AS IS" BASIS,
35+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36+
See the License for the specific language governing permissions and
37+
limitations under the License.
38+
"""
39+
40+
__version_info__ = 'AboutCode v{0}\n'.format(__version__)
41+
42+
43+
__full_info__ = 'AboutCode tool v{0}\n{1}'.format(__version__, __copyright__)
44+
45+
46+
VERBOSITY_HELP = """\
47+
Control warning and errors printed while processing:
48+
0 - Do not print warning or error messages, only a total count (default).
49+
1 - Print only error messages.
50+
2 - Print error and warning messages.
51+
"""
52+
53+
54+
MAPPING_HELP = """\
55+
Load the about_code_tool/MAPPING.CONFIG file. This file contains a mapping between
56+
known AboutCode key/column names and custom key/column name used in your CSVs files.
57+
"""
58+

about_code_tool/licenses.py

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf8 -*-
3+
4+
# ============================================================================
5+
# Copyright (c) 2013-2015 nexB Inc. http://www.nexb.com/ - All rights reserved.
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ============================================================================
16+
17+
from __future__ import print_function
18+
19+
20+
# SPDX License Identifiers from http://spdx.org/licenses/
21+
# based on SPDX License List version 1.18 released on 2013-04-10
22+
SPDX_LICENSES = (
23+
'AFL-1.1',
24+
'AFL-1.2',
25+
'AFL-2.0',
26+
'AFL-2.1',
27+
'AFL-3.0',
28+
'APL-1.0',
29+
'Aladdin',
30+
'ANTLR-PD',
31+
'Apache-1.0',
32+
'Apache-1.1',
33+
'Apache-2.0',
34+
'APSL-1.0',
35+
'APSL-1.1',
36+
'APSL-1.2',
37+
'APSL-2.0',
38+
'Artistic-1.0',
39+
'Artistic-2.0',
40+
'AAL',
41+
'BitTorrent-1.0',
42+
'BitTorrent-1.1',
43+
'BSL-1.0',
44+
'BSD-2-Clause',
45+
'BSD-2-Clause-FreeBSD',
46+
'BSD-2-Clause-NetBSD',
47+
'BSD-3-Clause',
48+
'BSD-3-Clause-Clear',
49+
'BSD-4-Clause',
50+
'BSD-4-Clause-UC',
51+
'CECILL-1.0',
52+
'CECILL-1.1',
53+
'CECILL-2.0',
54+
'CECILL-B',
55+
'CECILL-C',
56+
'ClArtistic',
57+
'CNRI-Python',
58+
'CNRI-Python-GPL-Compatible',
59+
'CPOL-1.02',
60+
'CDDL-1.0',
61+
'CDDL-1.1',
62+
'CPAL-1.0',
63+
'CPL-1.0',
64+
'CATOSL-1.1',
65+
'Condor-1.1',
66+
'CC-BY-1.0',
67+
'CC-BY-2.0',
68+
'CC-BY-2.5',
69+
'CC-BY-3.0',
70+
'CC-BY-ND-1.0',
71+
'CC-BY-ND-2.0',
72+
'CC-BY-ND-2.5',
73+
'CC-BY-ND-3.0',
74+
'CC-BY-NC-1.0',
75+
'CC-BY-NC-2.0',
76+
'CC-BY-NC-2.5',
77+
'CC-BY-NC-3.0',
78+
'CC-BY-NC-ND-1.0',
79+
'CC-BY-NC-ND-2.0',
80+
'CC-BY-NC-ND-2.5',
81+
'CC-BY-NC-ND-3.0',
82+
'CC-BY-NC-SA-1.0',
83+
'CC-BY-NC-SA-2.0',
84+
'CC-BY-NC-SA-2.5',
85+
'CC-BY-NC-SA-3.0',
86+
'CC-BY-SA-1.0',
87+
'CC-BY-SA-2.0',
88+
'CC-BY-SA-2.5',
89+
'CC-BY-SA-3.0',
90+
'CC0-1.0',
91+
'CUA-OPL-1.0',
92+
'D-FSL-1.0',
93+
'WTFPL',
94+
'EPL-1.0',
95+
'eCos-2.0',
96+
'ECL-1.0',
97+
'ECL-2.0',
98+
'EFL-1.0',
99+
'EFL-2.0',
100+
'Entessa',
101+
'ErlPL-1.1',
102+
'EUDatagrid',
103+
'EUPL-1.0',
104+
'EUPL-1.1',
105+
'Fair',
106+
'Frameworx-1.0',
107+
'FTL',
108+
'AGPL-1.0',
109+
'AGPL-3.0',
110+
'GFDL-1.1',
111+
'GFDL-1.2',
112+
'GFDL-1.3',
113+
'GPL-1.0',
114+
'GPL-1.0+',
115+
'GPL-2.0',
116+
'GPL-2.0+',
117+
'GPL-2.0-with-autoconf-exception',
118+
'GPL-2.0-with-bison-exception',
119+
'GPL-2.0-with-classpath-exception',
120+
'GPL-2.0-with-font-exception',
121+
'GPL-2.0-with-GCC-exception',
122+
'GPL-3.0',
123+
'GPL-3.0+',
124+
'GPL-3.0-with-autoconf-exception',
125+
'GPL-3.0-with-GCC-exception',
126+
'LGPL-2.1',
127+
'LGPL-2.1+',
128+
'LGPL-3.0',
129+
'LGPL-3.0+',
130+
'LGPL-2.0',
131+
'LGPL-2.0+',
132+
'gSOAP-1.3b',
133+
'HPND',
134+
'IPL-1.0',
135+
'Imlib2',
136+
'IJG',
137+
'Intel',
138+
'IPA',
139+
'ISC',
140+
'JSON',
141+
'LPPL-1.3a',
142+
'LPPL-1.0',
143+
'LPPL-1.1',
144+
'LPPL-1.2',
145+
'LPPL-1.3c',
146+
'Libpng',
147+
'LPL-1.02',
148+
'LPL-1.0',
149+
'MS-PL',
150+
'MS-RL',
151+
'MirOS',
152+
'MIT',
153+
'Motosoto',
154+
'MPL-1.0',
155+
'MPL-1.1',
156+
'MPL-2.0',
157+
'MPL-2.0-no-copyleft-exception',
158+
'Multics',
159+
'NASA-1.3',
160+
'Naumen',
161+
'NBPL-1.0',
162+
'NGPL',
163+
'NOSL',
164+
'NPL-1.0',
165+
'NPL-1.1',
166+
'Nokia',
167+
'NPOSL-3.0',
168+
'NTP',
169+
'OCLC-2.0',
170+
'ODbL-1.0',
171+
'PDDL-1.0',
172+
'OGTSL',
173+
'OLDAP-2.2.2',
174+
'OLDAP-1.1',
175+
'OLDAP-1.2',
176+
'OLDAP-1.3',
177+
'OLDAP-1.4',
178+
'OLDAP-2.0',
179+
'OLDAP-2.0.1',
180+
'OLDAP-2.1',
181+
'OLDAP-2.2',
182+
'OLDAP-2.2.1',
183+
'OLDAP-2.3',
184+
'OLDAP-2.4',
185+
'OLDAP-2.5',
186+
'OLDAP-2.6',
187+
'OLDAP-2.7',
188+
'OPL-1.0',
189+
'OSL-1.0',
190+
'OSL-2.0',
191+
'OSL-2.1',
192+
'OSL-3.0',
193+
'OLDAP-2.8',
194+
'OpenSSL',
195+
'PHP-3.0',
196+
'PHP-3.01',
197+
'PostgreSQL',
198+
'Python-2.0',
199+
'QPL-1.0',
200+
'RPSL-1.0',
201+
'RPL-1.1',
202+
'RPL-1.5',
203+
'RHeCos-1.1',
204+
'RSCPL',
205+
'Ruby',
206+
'SAX-PD',
207+
'SGI-B-1.0',
208+
'SGI-B-1.1',
209+
'SGI-B-2.0',
210+
'OFL-1.0',
211+
'OFL-1.1',
212+
'SimPL-2.0',
213+
'Sleepycat',
214+
'SMLNJ',
215+
'SugarCRM-1.1.3',
216+
'SISSL',
217+
'SPL-1.0',
218+
'Watcom-1.0',
219+
'NCSA',
220+
'VSL-1.0',
221+
'W3C',
222+
'WXwindows',
223+
'Xnet',
224+
'X11',
225+
'XFree86-1.1',
226+
'YPL-1.0',
227+
'YPL-1.1',
228+
'Zimbra-1.3',
229+
'Zlib',
230+
'ZPL-1.1',
231+
'ZPL-2.0',
232+
'ZPL-2.1',
233+
)
234+
235+
236+
# Maps lowercase id to standard ids with official case
237+
SPDX_LICENSE_IDS = dict((name.lower(), name) for name in SPDX_LICENSES)
238+
239+
240+
# Use DJE License Name
241+
COMMON_LICENSES = (
242+
'AES-128 v3.0 License',
243+
'Apache License 1.1',
244+
'Apache License 2.0',
245+
'Apple Attribution License 1997',
246+
'Apple Example Code License',
247+
'Apple Public Source License 2.0',
248+
'Arphic Public License',
249+
'Artistic License (Perl) 1.0',
250+
'Artistic License 2.0',
251+
'Bitstream Vera Font License',
252+
'Boost Software License 1.0',
253+
'Broadcom CFE License',
254+
'BSD-Modified',
255+
'BSD-Original',
256+
'BSD-Original-UC',
257+
'BSD-Simplified',
258+
'CMU Computing Services License',
259+
'Common Development and Distribution License 1.0',
260+
'Common Development and Distribution License 1.1',
261+
'Common Public License 1.0',
262+
'Creative Commons Attribution License 2.5',
263+
'Creative Commons Attribution Share Alike License 3.0',
264+
'Curl License',
265+
'FreeType Project License',
266+
'GNU General Public License 2.0',
267+
'GNU General Public License 2.0 with Bison exception',
268+
'GNU General Public License 2.0 with GLIBC exception',
269+
'GNU General Public License 3.0',
270+
'GNU Lesser General Public License 2.1',
271+
'GNU Library General Public License 2.0',
272+
'GPL 2.0 or later with Linking exception',
273+
'GPL 2.0 with Broadcom Linking exception',
274+
'Independent JPEG Group License',
275+
'ISC License (ISCL)',
276+
'Larabie Fonts EULA',
277+
'Libpng License',
278+
'Microsoft Limited Public License',
279+
'Microsoft Public License',
280+
'Microsoft Reciprocal License',
281+
'Microsoft TrueType Fonts EULA',
282+
'MIT License',
283+
'Mozilla Public License 1.1',
284+
'Net SNMP License',
285+
'Netscape Public License 1.1',
286+
'NTP License',
287+
'OpenSSL/SSLeay License',
288+
'Original SSLeay License with Windows exception',
289+
'RSA Data Security MD4',
290+
'RSA Data Security MD5',
291+
'SFL License Agreement',
292+
'SGI Free Software License B v2.0',
293+
'Sun RPC License',
294+
'TCL/TK License',
295+
'Tidy License',
296+
'University of Illinois/NCSA Open Source License',
297+
'X11 License',
298+
'ZLIB License',
299+
)

0 commit comments

Comments
 (0)