Skip to content

Commit 09b28bb

Browse files
committed
Run pip-licenses on the format-nongpl extra.
1 parent 3c2b169 commit 09b28bb

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ jobs:
109109
- name: "3.11"
110110
toxenv: docs-style
111111
- name: "3.11"
112-
toxenv: audit
112+
toxenv: format-audit
113+
- name: "3.11"
114+
toxenv: formatnongpl-audit
115+
- name: "3.11"
116+
toxenv: noextra-audit
113117
- name: "3.11"
114118
toxenv: readme
115119
- name: "3.11"

docs/validate.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,22 @@ The easiest way to ensure you have what is needed is to install ``jsonschema`` u
196196

197197
For example:
198198

199-
.. code-block:: sh
199+
.. code:: sh
200200
201201
$ pip install jsonschema[format]
202202
203-
Or if you want to install MIT-license compatible dependencies only:
203+
Or if you want to avoid GPL dependencies, a second extra is available:
204204

205-
.. code-block:: sh
205+
.. code:: sh
206206
207207
$ pip install jsonschema[format-nongpl]
208208
209-
The non-GPL extra is intended to not install any direct dependencies that are GPL licensed (but that of course end-users should do their own verification).
210209
At the moment, it supports all the available checkers except for ``iri`` and ``iri-reference``.
211210

211+
.. warning::
212+
213+
It is your own responsibility ultimately to ensure you are license-compliant, so you should be double checking your own dependencies if you rely on this extra.
214+
212215
The more specific list of formats along with any additional dependencies they have is shown below.
213216

214217
.. warning::

tox.ini

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
33
py{37,38,39,310,311,py3}-{noextra,format,formatnongpl}-{build,tests}
4-
audit
4+
{noextra,format,formatnongpl}-audit
55
readme
66
secrets
77
style
@@ -26,6 +26,11 @@ commands =
2626
format,perf,perfsuite: {envpython} -m pip install --disable-pip-version-check '{toxinidir}[format]'
2727
formatnongpl: {envpython} -m pip install --disable-pip-version-check '{toxinidir}[format-nongpl]'
2828

29+
audit: {envpython} -m pip_audit
30+
audit-formatnongpl: {envpython} -m piplicenses {posargs} --ignore-packages pip-requirements-parser pip_audit pip-api --allow-only="Apache Software License;ISC License (ISCL);MIT License;BSD License;Mozilla Public License 2.0 (MPL 2.0)"
31+
32+
build: {envpython} -m build {toxinidir} --outdir {envtmpdir}/dist
33+
2934
# Ignore the deprecation warning until pypa/setuptools#3276 is released
3035
tests,coverage,codecov: {envpython} -Werror -W"ignore:module 'sre_constants' is deprecated:DeprecationWarning" -m {env:MAYBE_COVERAGE:} twisted.trial {posargs:jsonschema}
3136
tests: {envpython} -m doctest {toxinidir}/README.rst
@@ -37,9 +42,10 @@ commands =
3742

3843
perf: {envpython} {toxinidir}/jsonschema/benchmarks/issue232.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-issue232.json}
3944
perfsuite: {envpython} {toxinidir}/jsonschema/benchmarks/json_schema_test_suite.py --inherit-environ JSON_SCHEMA_TEST_SUITE {posargs:--output {envtmpdir}/bench-json_schema_test_suite.json}
40-
41-
build: {envpython} -m build {toxinidir} --outdir {envtmpdir}/dist
4245
deps =
46+
audit: pip-audit
47+
audit-formatnongpl: pip-licenses
48+
4349
build: build
4450

4551
perf,perfsuite: pyperf
@@ -63,12 +69,6 @@ commands =
6369
{envpython} -m twine check {envtmpdir}/dist/*
6470
{envbindir}/rst2html5.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null
6571

66-
[testenv:audit]
67-
deps = pip-audit
68-
commands =
69-
{envpython} -m pip install --disable-pip-version-check '{toxinidir}[format]'
70-
{envpython} -m pip_audit
71-
7272
[testenv:secrets]
7373
deps = detect-secrets
7474
commands = {envbindir}/detect-secrets scan {toxinidir}

0 commit comments

Comments
 (0)