diff --git a/news/13134.feature.rst b/news/13134.feature.rst new file mode 100644 index 00000000000..b87f67d376d --- /dev/null +++ b/news/13134.feature.rst @@ -0,0 +1,4 @@ +Support :pep:`639` License-Expression and License-File metadata fields in JSON +output. ``pip inspect`` and ``pip install --report`` now emit +``license_expression`` and ``license_file`` fields in the ``metadata`` object, +if the corresponding fields are present in the installed ``METADATA`` file. diff --git a/src/pip/_internal/metadata/_json.py b/src/pip/_internal/metadata/_json.py index 9097dd58590..f3aeab3225f 100644 --- a/src/pip/_internal/metadata/_json.py +++ b/src/pip/_internal/metadata/_json.py @@ -23,6 +23,8 @@ ("Maintainer", False), ("Maintainer-email", False), ("License", False), + ("License-Expression", False), + ("License-File", True), ("Classifier", True), ("Requires-Dist", True), ("Requires-Python", False),