@@ -34,9 +34,8 @@ license expression engine in several projects and products such as:
3434
3535- AboutCode-toolkit https://github.com/aboutcode-org/aboutcode-toolkit
3636- AlekSIS (School Information System) https://edugit.org/AlekSIS/official/AlekSIS-Core
37- - Barista https://github.com/Optum/barista
3837- Conda forge tools https://github.com/conda-forge/conda-smithy
39- - DejaCode https://dejacode.com
38+ - DejaCode https://enterprise. dejacode.com
4039- DeltaCode https://github.com/nexB/deltacode
4140- FenixscanX https://github.com/SmartsYoung/FenixscanX
4241- FetchCode https://github.com/aboutcode-org/fetchcode
@@ -49,7 +48,7 @@ license expression engine in several projects and products such as:
4948- SecObserve https://github.com/MaibornWolff/SecObserve
5049
5150See also for details:
52- - https://spdx.github.io/spdx-spec/appendix-IV- SPDX-license-expressions/
51+ - https://spdx.github.io/spdx-spec/v2.3/ SPDX-license-expressions
5352
5453``license-expression `` is also packaged for most Linux distributions. See below.
5554
@@ -65,17 +64,6 @@ libraries in other languages (but not as powerful of course!):
6564- Ada https://github.com/Fabien-Chouteau/spdx_ada
6665- Java https://github.com/spdx/tools and https://github.com/aschet/spdx-license-expression-tools
6766
68- Build and tests status
69- ======================
70-
71- +--------------------------+------------------------+----------------------------------+
72- | **Linux & macOS (Travis)**| **Windows (AppVeyor)** |**Linux, Windows & macOS (Azure)**|
73- +==========================+========================+==================================+
74- | | | |
75- | |travis-badge-icon | | |appveyor-badge-icon | | |azure-badge-icon | |
76- | | | |
77- +--------------------------+------------------------+----------------------------------+
78-
7967Source code and download
8068========================
8169
@@ -125,36 +113,36 @@ validate, compare, simplify and normalize license expressions.
125113
126114Create an SPDX Licensing and parse expressions::
127115
128- >>> from license_expression import get_spdx_licensing
129- >>> licensing = get_spdx_licensing()
130- >>> expression = ' GPL-2.0 or LGPL-2.1 and mit '
131- >>> parsed = licensing.parse(expression)
132- >>> print(parsed.pretty())
133- OR(
134- LicenseSymbol('GPL-2.0-only'),
135- AND(
136- LicenseSymbol('LGPL-2.1-only'),
137- LicenseSymbol('MIT')
138- )
139- )
140-
141- >>> str(parsed)
142- 'GPL-2.0-only OR (LGPL-2.1-only AND MIT)'
143-
144- >>> licensing.parse('unknwon with foo', validate=True, strict=True)
145- license_expression.ExpressionParseError: A plain license symbol cannot be used
146- as an exception in a "WITH symbol" statement. for token: "foo" at position: 13
147-
148- >>> licensing.parse('unknwon with foo', validate=True)
149- license_expression.ExpressionError: Unknown license key(s): unknwon, foo
150-
151- >>> licensing.validate('foo and MIT and GPL-2.0+')
152- ExpressionInfo(
153- original_expression='foo and MIT and GPL-2.0+',
154- normalized_expression=None,
155- errors=['Unknown license key(s): foo'],
156- invalid_symbols=['foo']
157- )
116+ >>> from license_expression import get_spdx_licensing
117+ >>> licensing = get_spdx_licensing()
118+ >>> expression = ' GPL-2.0 or LGPL-2.1 and mit '
119+ >>> parsed = licensing.parse(expression)
120+ >>> print(parsed.pretty())
121+ OR(
122+ LicenseSymbol('GPL-2.0-only'),
123+ AND(
124+ LicenseSymbol('LGPL-2.1-only'),
125+ LicenseSymbol('MIT')
126+ )
127+ )
128+
129+ >>> str(parsed)
130+ 'GPL-2.0-only OR (LGPL-2.1-only AND MIT)'
131+
132+ >>> licensing.parse('unknwon with foo', validate=True, strict=True)
133+ license_expression.ExpressionParseError: A plain license symbol cannot be used
134+ as an exception in a "WITH symbol" statement. for token: "foo" at position: 13
135+
136+ >>> licensing.parse('unknwon with foo', validate=True)
137+ license_expression.ExpressionError: Unknown license key(s): unknwon, foo
138+
139+ >>> licensing.validate('foo and MIT and GPL-2.0+')
140+ ExpressionInfo(
141+ original_expression='foo and MIT and GPL-2.0+',
142+ normalized_expression=None,
143+ errors=['Unknown license key(s): foo'],
144+ invalid_symbols=['foo']
145+ )
158146
159147
160148Create a simple Licensing and parse expressions::
@@ -243,20 +231,3 @@ Development
243231- On Windows run ``configure.bat --dev `` and then ``Scripts\bin\activate `` instead.
244232
245233- To run the tests, run ``pytest -vvs ``
246-
247-
248- .. |travis-badge-icon | image :: https://api.travis-ci.org/nexB/license-expression.png?branch=master
249- :target: https://travis-ci.org/nexB/license-expression
250- :alt: Travis tests status
251- :align: middle
252-
253- .. |appveyor-badge-icon | image :: https://ci.appveyor.com/api/projects/status/github/nexB/license-expression?svg=true
254- :target: https://ci.appveyor.com/project/nexB/license-expression
255- :alt: Appveyor tests status
256- :align: middle
257-
258- .. |azure-badge-icon | image :: https://dev.azure.com/nexB/license-expression/_apis/build/status/nexB.license-expression?branchName=master
259- :target: https://dev.azure.com/nexB/license-expression/_build/latest?definitionId=2&branchName=master
260- :alt: Azure pipelines tests status
261- :align: middle
262-
0 commit comments