Skip to content

Commit 898710e

Browse files
committed
Add details on package location and metadata parsing
1 parent e49a3ad commit 898710e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/html/reference/pip_show.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ The various fields present in the JSON output and their explanation is as follow
3232

3333
*metadata*
3434
A dictionary with the core metadata fields present in the ``METADATA`` file,
35-
as defined in the `Core metadata specifications`_. The fields are
35+
as defined in the `Core metadata specifications`_. We use the method detailed in
36+
`JSON-compatible Metadata`_ to convert core metadata to json. The fields are
3637
lower cased, with dashes replaced by underscores.
3738

3839
*direct_url*
@@ -56,9 +57,12 @@ The various fields present in the JSON output and their explanation is as follow
5657
on the queried distribution.
5758

5859
*location*
59-
A string containing the path where the distribution is installed.
60+
A string containing the path where the distribution is installed. For legacy installs,
61+
this is the parent directory of the metadata (.dist-info or .egg-info) directory.
62+
For legacy editable installs, this is the directory where the source is located.
6063

6164
.. _`Core metadata specifications`: https://packaging.python.org/specifications/core-metadata/
65+
.. _`JSON-compatible Metadata`: https://www.python.org/dev/peps/pep-0566/#json-compatible-metadata
6266

6367
Examples
6468
========

0 commit comments

Comments
 (0)