@@ -6,6 +6,7 @@ Define a foss compatability license_matrix.
66
77- [ Licensecheck] ( ../README.md#licensecheck-index ) / [ Modules] ( ../README.md#licensecheck-modules ) / [ licensecheck] ( index.md#licensecheck ) / license_matrix
88 - [ depCompatWMyLice] ( #depcompatwmylice )
9+ - [ licenseLookup] ( #licenselookup )
910 - [ licenseType] ( #licensetype )
1011
1112Standard disclaimer:: I am not a lawyer and there is no guarantee that the
@@ -43,36 +44,36 @@ EU -> gpl -> agpl (3 only)
4344
4445#### Attributes
4546
46- - ` PERMISSIVE ` - Permissive licenses compatible with GPL: ` [License .MIT, License .BOOST, License .BSD, Licen... `
47- - ` PERMISSIVE_OTHER ` - Permissive licenses NOT compatible with GPL: ` [License .APACHE, License .ECLIPSE, License .ACADEMIC_FREE] `
48- - ` LGPL ` - LGPL licenses: ` [License .LGPL_2, License .LGPL_3, License.LGPL_2... `
49- - ` GPL ` - GPL licenses (including AGPL): ` [License .GPL_2, License .GPL_3, License.GPL_2_PL... `
50- - ` OTHER_COPYLEFT ` - Other Copyleft licenses: ` [License .MPL, License .EU] `
47+ - ` PERMISSIVE ` - Permissive licenses compatible with GPL: ` [L .MIT, L .BOOST, L .BSD, L.ISC, L.NCSA, L.PSFL] `
48+ - ` PERMISSIVE_OTHER ` - Permissive licenses NOT compatible with GPL: ` [L .APACHE, L .ECLIPSE, L .ACADEMIC_FREE] `
49+ - ` LGPL ` - LGPL licenses: ` [L .LGPL_2, L .LGPL_3, L.LGPL_2_PLUS, L.LGPL_3_PLUS, L.LGPL_X] `
50+ - ` GPL ` - GPL licenses (including AGPL): ` [L .GPL_2, L .GPL_3, L.GPL_2_PLUS, L.GPL_3_PLUS, L.GPL_X, L.AGPL_3_PLUS] `
51+ - ` OTHER_COPYLEFT ` - Other Copyleft licenses: ` [L .MPL, L .EU] `
5152- ` UNLICENSE_INCOMPATIBLE ` - Basic compat matrix: ` PERMISSIVE + PERMISSIVE_OTHER + GPL + LGPL + OT... `
5253- ` GPL_2_INCOMPATIBLE ` - GPL compat matrix
53- https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility : ` [License .GPL_3, License .GPL_3_PLUS, License .LGPL_3, License .LGPL_3_PLUS] `
54+ https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility : ` [L .GPL_3, L .GPL_3_PLUS, L .LGPL_3, L .LGPL_3_PLUS] `
5455
5556## depCompatWMyLice
5657
57- [[ find in source code]] ( ../../licensecheck/license_matrix.py#L168 )
58+ [[ find in source code]] ( ../../licensecheck/license_matrix.py#L153 )
5859
5960``` python
6061def depCompatWMyLice (
61- myLicense : License ,
62- depLice : list[License ],
63- ignoreLicenses : list[License ] = None ,
64- failLicenses : list[License ] = None ,
62+ myLicense : L ,
63+ depLice : list[L ],
64+ ignoreLicenses : list[L ] = None ,
65+ failLicenses : list[L ] = None ,
6566) -> bool :
6667```
6768
6869Identify if the end user license is compatible with the dependency license(s).
6970
7071#### Arguments
7172
72- - ` myLicense ` * License * - end user license to check
73- - ` depLice ` * list[ License ] * - dependency license
74- - ` ignoreLicenses ` * list[ License ] , optional* - list of licenses to ignore. Defaults to None.
75- - ` failLicenses ` * list[ License ] , optional* - list of licenses to fail on. Defaults to None.
73+ - ` myLicense ` * L * - end user license to check
74+ - ` depLice ` * list[ L ] * - dependency license
75+ - ` ignoreLicenses ` * list[ L ] , optional* - list of licenses to ignore. Defaults to None.
76+ - ` failLicenses ` * list[ L ] , optional* - list of licenses to fail on. Defaults to None.
7677
7778#### Returns
7879
@@ -82,12 +83,34 @@ Identify if the end user license is compatible with the dependency license(s).
8283
8384- [ License] ( types.md#license )
8485
85- ## licenseType
86+ ## licenseLookup
8687
8788[[ find in source code]] ( ../../licensecheck/license_matrix.py#L43 )
8889
8990``` python
90- def licenseType (lice : str ) -> list[License]:
91+ def licenseLookup (licenseStr : str ) -> L:
92+ ```
93+
94+ Identify a license from an uppercase string representation of a license.
95+
96+ #### Arguments
97+
98+ - ` licenseStr ` * str* - uppercase string representation of a license
99+
100+ #### Returns
101+
102+ - ` L ` - License represented by licenseStr
103+
104+ #### See also
105+
106+ - [ License] ( types.md#license )
107+
108+ ## licenseType
109+
110+ [[ find in source code]] ( ../../licensecheck/license_matrix.py#L86 )
111+
112+ ``` python
113+ def licenseType (lice : str ) -> list[L]:
91114```
92115
93116Return a list of license types from a license string.
@@ -98,4 +121,4 @@ Return a list of license types from a license string.
98121
99122#### Returns
100123
101- - ` list[License ] ` - the license
124+ - ` list[L ] ` - the license
0 commit comments