Repository: pypa/pip

Issue:
Include Project-URLs in `pip show` output
### What's the problem this feature will solve?

A growing number of packages record URLs for things like their source repository and documentation using [Project-URL](https://packaging.python.org/en/latest/specifications/core-metadata/#project-url-multiple-use) metadata, yet `pip show` currently does not output these values, not even when `--verbose` is supplied.  `pip show` does output the Home-page URL, but given that [PEP 621](https://www.python.org/dev/peps/pep-0621/) drops support for specifying this metadata field in favor of using Project-URLs instead, the number of packages that have Project-URLs but no Home-page is only going to grow.

### Describe the solution you'd like

`pip show packagename` should include in its output each Project-URL from the given project's metadata in a form like:

```
Name: pip
Version: 21.3.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Project-URL: Documentation, https://pip.pypa.io
Project-URL: Source, https://github.com/pypa/pip
Project-URL: Changelog, https://pip.pypa.io/en/stable/news/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: 
Required-by: pip-run, pipdeptree
```

If a project has no Project-URLs, no Project-URL fields will be emitted.

### Alternative Solutions

* The `--verbose` option could be required in order to display Project-URLs
* Rather than outputting each Project-URL in a separate field, something similar to how `pip show -v` shows classifiers could be done:

```
Name: pip
Version: 21.3.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Project-URLs:
  Documentation, https://pip.pypa.io
  Source, https://github.com/pypa/pip
  Changelog, https://pip.pypa.io/en/stable/news/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: 
Required-by: pip-run, pipdeptree
```

### Additional context

N/A.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).


Discussion:

Resolving patch:
diff --git a/src/pip/_internal/commands/show.py b/src/pip/_internal/commands/show.py
--- a/src/pip/_internal/commands/show.py
+++ b/src/pip/_internal/commands/show.py
@@ -60,6 +60,7 @@ class _PackageInfo(NamedTuple):
     classifiers: List[str]
     summary: str
     homepage: str
+    project_urls: List[str]
     author: str
     author_email: str
     license: str
@@ -126,6 +127,7 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
             classifiers=metadata.get_all("Classifier", []),
             summary=metadata.get("Summary", ""),
             homepage=metadata.get("Home-page", ""),
+            project_urls=metadata.get_all("Project-URL", []),
             author=metadata.get("Author", ""),
             author_email=metadata.get("Author-email", ""),
             license=metadata.get("License", ""),
@@ -168,6 +170,9 @@ def print_results(
             write_output("Entry-points:")
             for entry in dist.entry_points:
                 write_output("  %s", entry.strip())
+            write_output("Project-URLs:")
+            for project_url in dist.project_urls:
+                write_output("  %s", project_url)
         if list_files:
             write_output("Files:")
             if dist.files is None:


Test patch:
diff --git a/tests/functional/test_show.py b/tests/functional/test_show.py
--- a/tests/functional/test_show.py
+++ b/tests/functional/test_show.py
@@ -174,6 +174,17 @@ def test_show_verbose_installer(script: PipTestEnvironment, data: TestData) -> N
     assert "Installer: pip" in lines
 
 
+def test_show_verbose_project_urls(script: PipTestEnvironment) -> None:
+    """
+    Test that project urls can be listed
+    """
+    result = script.pip("show", "pip", "--verbose")
+    lines = result.stdout.splitlines()
+    assert "Name: pip" in lines
+    assert re.search(r"Project-URLs:\n(  .+\n)+", result.stdout)
+    assert "Source, https://github.com/pypa/pip" in result.stdout
+
+
 def test_show_verbose(script: PipTestEnvironment) -> None:
     """
     Test end to end test for verbose show command.
@@ -184,6 +195,7 @@ def test_show_verbose(script: PipTestEnvironment) -> None:
     assert any(line.startswith("Installer: ") for line in lines)
     assert "Entry-points:" in lines
     assert "Classifiers:" in lines
+    assert "Project-URLs:" in lines
 
 
 def test_all_fields(script: PipTestEnvironment) -> None: