Skip to content

Commit 394e032

Browse files
authored
Support PEP 639 License-Expression and License-File in JSON output (#13134)
Adds PEP 639 support to `pip inspect` and `pip install --report`.
1 parent d1c0dad commit 394e032

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

news/13134.feature.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Support :pep:`639` License-Expression and License-File metadata fields in JSON
2+
output. ``pip inspect`` and ``pip install --report`` now emit
3+
``license_expression`` and ``license_file`` fields in the ``metadata`` object,
4+
if the corresponding fields are present in the installed ``METADATA`` file.

src/pip/_internal/metadata/_json.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
("Maintainer", False),
2424
("Maintainer-email", False),
2525
("License", False),
26+
("License-Expression", False),
27+
("License-File", True),
2628
("Classifier", True),
2729
("Requires-Dist", True),
2830
("Requires-Python", False),

0 commit comments

Comments
 (0)