We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Show 'home-page' project URL when Home-Page metadata value is not set
### What's the problem this feature will solve?

When installing a pyproject.toml-only project, the `Home-Page` metadata won't be set (as there's no way to specify it: PEP 621 only maps to `Project-Url`). This means `pip show` won't provide any URL to the user.

### Describe the solution you'd like

If `Home-Page` is not set, instead select one of the project URLs (if present), with the following order of preference:
* Home-page
* Homepage
* homepage
* Source
* fallback: the first project-URL in the metadata

### Alternative Solutions

`pip show -v` shows all project URLs, but that still shows an empty `Home-page:` field

### Additional context

Project URLs were included in `pip show -v` in #10827

### Code of Conduct

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

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/pip/_internal/commands/show.py`
Content:
```
1 import logging
2 from optparse import Values
3 from typing import Generator, Iterable, Iterator, List, NamedTuple, Optional
4 
5 from pip._vendor.packaging.utils import canonicalize_name
6 
7 from pip._internal.cli.base_command import Command
8 from pip._internal.cli.status_codes import ERROR, SUCCESS
9 from pip._internal.metadata import BaseDistribution, get_default_environment
10 from pip._internal.utils.misc import write_output
11 
12 logger = logging.getLogger(__name__)
13 
14 
15 class ShowCommand(Command):
16     """
17     Show information about one or more installed packages.
18 
19     The output is in RFC-compliant mail header format.
20     """
21 
22     usage = """
23       %prog [options] <package> ..."""
24     ignore_require_venv = True
25 
26     def add_options(self) -> None:
27         self.cmd_opts.add_option(
28             "-f",
29             "--files",
30             dest="files",
31             action="store_true",
32             default=False,
33             help="Show the full list of installed files for each package.",
34         )
35 
36         self.parser.insert_option_group(0, self.cmd_opts)
37 
38     def run(self, options: Values, args: List[str]) -> int:
39         if not args:
40             logger.warning("ERROR: Please provide a package name or names.")
41             return ERROR
42         query = args
43 
44         results = search_packages_info(query)
45         if not print_results(
46             results, list_files=options.files, verbose=options.verbose
47         ):
48             return ERROR
49         return SUCCESS
50 
51 
52 class _PackageInfo(NamedTuple):
53     name: str
54     version: str
55     location: str
56     editable_project_location: Optional[str]
57     requires: List[str]
58     required_by: List[str]
59     installer: str
60     metadata_version: str
61     classifiers: List[str]
62     summary: str
63     homepage: str
64     project_urls: List[str]
65     author: str
66     author_email: str
67     license: str
68     entry_points: List[str]
69     files: Optional[List[str]]
70 
71 
72 def search_packages_info(query: List[str]) -> Generator[_PackageInfo, None, None]:
73     """
74     Gather details from installed distributions. Print distribution name,
75     version, location, and installed files. Installed files requires a
76     pip generated 'installed-files.txt' in the distributions '.egg-info'
77     directory.
78     """
79     env = get_default_environment()
80 
81     installed = {dist.canonical_name: dist for dist in env.iter_all_distributions()}
82     query_names = [canonicalize_name(name) for name in query]
83     missing = sorted(
84         [name for name, pkg in zip(query, query_names) if pkg not in installed]
85     )
86     if missing:
87         logger.warning("Package(s) not found: %s", ", ".join(missing))
88 
89     def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
90         return (
91             dist.metadata["Name"] or "UNKNOWN"
92             for dist in installed.values()
93             if current_dist.canonical_name
94             in {canonicalize_name(d.name) for d in dist.iter_dependencies()}
95         )
96 
97     for query_name in query_names:
98         try:
99             dist = installed[query_name]
100         except KeyError:
101             continue
102 
103         requires = sorted(
104             # Avoid duplicates in requirements (e.g. due to environment markers).
105             {req.name for req in dist.iter_dependencies()},
106             key=str.lower,
107         )
108         required_by = sorted(_get_requiring_packages(dist), key=str.lower)
109 
110         try:
111             entry_points_text = dist.read_text("entry_points.txt")
112             entry_points = entry_points_text.splitlines(keepends=False)
113         except FileNotFoundError:
114             entry_points = []
115 
116         files_iter = dist.iter_declared_entries()
117         if files_iter is None:
118             files: Optional[List[str]] = None
119         else:
120             files = sorted(files_iter)
121 
122         metadata = dist.metadata
123 
124         yield _PackageInfo(
125             name=dist.raw_name,
126             version=str(dist.version),
127             location=dist.location or "",
128             editable_project_location=dist.editable_project_location,
129             requires=requires,
130             required_by=required_by,
131             installer=dist.installer,
132             metadata_version=dist.metadata_version or "",
133             classifiers=metadata.get_all("Classifier", []),
134             summary=metadata.get("Summary", ""),
135             homepage=metadata.get("Home-page", ""),
136             project_urls=metadata.get_all("Project-URL", []),
137             author=metadata.get("Author", ""),
138             author_email=metadata.get("Author-email", ""),
139             license=metadata.get("License", ""),
140             entry_points=entry_points,
141             files=files,
142         )
143 
144 
145 def print_results(
146     distributions: Iterable[_PackageInfo],
147     list_files: bool,
148     verbose: bool,
149 ) -> bool:
150     """
151     Print the information from installed distributions found.
152     """
153     results_printed = False
154     for i, dist in enumerate(distributions):
155         results_printed = True
156         if i > 0:
157             write_output("---")
158 
159         write_output("Name: %s", dist.name)
160         write_output("Version: %s", dist.version)
161         write_output("Summary: %s", dist.summary)
162         write_output("Home-page: %s", dist.homepage)
163         write_output("Author: %s", dist.author)
164         write_output("Author-email: %s", dist.author_email)
165         write_output("License: %s", dist.license)
166         write_output("Location: %s", dist.location)
167         if dist.editable_project_location is not None:
168             write_output(
169                 "Editable project location: %s", dist.editable_project_location
170             )
171         write_output("Requires: %s", ", ".join(dist.requires))
172         write_output("Required-by: %s", ", ".join(dist.required_by))
173 
174         if verbose:
175             write_output("Metadata-Version: %s", dist.metadata_version)
176             write_output("Installer: %s", dist.installer)
177             write_output("Classifiers:")
178             for classifier in dist.classifiers:
179                 write_output("  %s", classifier)
180             write_output("Entry-points:")
181             for entry in dist.entry_points:
182                 write_output("  %s", entry.strip())
183             write_output("Project-URLs:")
184             for project_url in dist.project_urls:
185                 write_output("  %s", project_url)
186         if list_files:
187             write_output("Files:")
188             if dist.files is None:
189                 write_output("Cannot locate RECORD or installed-files.txt")
190             else:
191                 for line in dist.files:
192                     write_output("  %s", line.strip())
193     return results_printed
194
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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
@@ -121,6 +121,22 @@
 
         metadata = dist.metadata
 
+        project_urls = metadata.get_all("Project-URL", [])
+        homepage = metadata.get("Home-page", "")
+        if not homepage:
+            # It's common that there is a "homepage" Project-URL, but Home-page
+            # remains unset (especially as PEP 621 doesn't surface the field).
+            #
+            # This logic was taken from PyPI's codebase.
+            for url in project_urls:
+                url_label, url = url.split(",", maxsplit=1)
+                normalized_label = (
+                    url_label.casefold().replace("-", "").replace("_", "").strip()
+                )
+                if normalized_label == "homepage":
+                    homepage = url.strip()
+                    break
+
         yield _PackageInfo(
             name=dist.raw_name,
             version=str(dist.version),
@@ -132,8 +148,8 @@
             metadata_version=dist.metadata_version or "",
             classifiers=metadata.get_all("Classifier", []),
             summary=metadata.get("Summary", ""),
-            homepage=metadata.get("Home-page", ""),
-            project_urls=metadata.get_all("Project-URL", []),
+            homepage=homepage,
+            project_urls=project_urls,
             author=metadata.get("Author", ""),
             author_email=metadata.get("Author-email", ""),
             license=metadata.get("License", ""),

{"golden_diff": "diff --git a/src/pip/_internal/commands/show.py b/src/pip/_internal/commands/show.py\n--- a/src/pip/_internal/commands/show.py\n+++ b/src/pip/_internal/commands/show.py\n@@ -121,6 +121,22 @@\n \n         metadata = dist.metadata\n \n+        project_urls = metadata.get_all(\"Project-URL\", [])\n+        homepage = metadata.get(\"Home-page\", \"\")\n+        if not homepage:\n+            # It's common that there is a \"homepage\" Project-URL, but Home-page\n+            # remains unset (especially as PEP 621 doesn't surface the field).\n+            #\n+            # This logic was taken from PyPI's codebase.\n+            for url in project_urls:\n+                url_label, url = url.split(\",\", maxsplit=1)\n+                normalized_label = (\n+                    url_label.casefold().replace(\"-\", \"\").replace(\"_\", \"\").strip()\n+                )\n+                if normalized_label == \"homepage\":\n+                    homepage = url.strip()\n+                    break\n+\n         yield _PackageInfo(\n             name=dist.raw_name,\n             version=str(dist.version),\n@@ -132,8 +148,8 @@\n             metadata_version=dist.metadata_version or \"\",\n             classifiers=metadata.get_all(\"Classifier\", []),\n             summary=metadata.get(\"Summary\", \"\"),\n-            homepage=metadata.get(\"Home-page\", \"\"),\n-            project_urls=metadata.get_all(\"Project-URL\", []),\n+            homepage=homepage,\n+            project_urls=project_urls,\n             author=metadata.get(\"Author\", \"\"),\n             author_email=metadata.get(\"Author-email\", \"\"),\n             license=metadata.get(\"License\", \"\"),\n", "issue": "Show 'home-page' project URL when Home-Page metadata value is not set\n### What's the problem this feature will solve?\n\nWhen installing a pyproject.toml-only project, the `Home-Page` metadata won't be set (as there's no way to specify it: PEP 621 only maps to `Project-Url`). This means `pip show` won't provide any URL to the user.\n\n### Describe the solution you'd like\n\nIf `Home-Page` is not set, instead select one of the project URLs (if present), with the following order of preference:\r\n* Home-page\r\n* Homepage\r\n* homepage\r\n* Source\r\n* fallback: the first project-URL in the metadata\n\n### Alternative Solutions\n\n`pip show -v` shows all project URLs, but that still shows an empty `Home-page:` field\n\n### Additional context\n\nProject URLs were included in `pip show -v` in #10827\n\n### Code of Conduct\n\n- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).\n", "before_files": [{"content": "import logging\nfrom optparse import Values\nfrom typing import Generator, Iterable, Iterator, List, NamedTuple, Optional\n\nfrom pip._vendor.packaging.utils import canonicalize_name\n\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import ERROR, SUCCESS\nfrom pip._internal.metadata import BaseDistribution, get_default_environment\nfrom pip._internal.utils.misc import write_output\n\nlogger = logging.getLogger(__name__)\n\n\nclass ShowCommand(Command):\n    \"\"\"\n    Show information about one or more installed packages.\n\n    The output is in RFC-compliant mail header format.\n    \"\"\"\n\n    usage = \"\"\"\n      %prog [options] <package> ...\"\"\"\n    ignore_require_venv = True\n\n    def add_options(self) -> None:\n        self.cmd_opts.add_option(\n            \"-f\",\n            \"--files\",\n            dest=\"files\",\n            action=\"store_true\",\n            default=False,\n            help=\"Show the full list of installed files for each package.\",\n        )\n\n        self.parser.insert_option_group(0, self.cmd_opts)\n\n    def run(self, options: Values, args: List[str]) -> int:\n        if not args:\n            logger.warning(\"ERROR: Please provide a package name or names.\")\n            return ERROR\n        query = args\n\n        results = search_packages_info(query)\n        if not print_results(\n            results, list_files=options.files, verbose=options.verbose\n        ):\n            return ERROR\n        return SUCCESS\n\n\nclass _PackageInfo(NamedTuple):\n    name: str\n    version: str\n    location: str\n    editable_project_location: Optional[str]\n    requires: List[str]\n    required_by: List[str]\n    installer: str\n    metadata_version: str\n    classifiers: List[str]\n    summary: str\n    homepage: str\n    project_urls: List[str]\n    author: str\n    author_email: str\n    license: str\n    entry_points: List[str]\n    files: Optional[List[str]]\n\n\ndef search_packages_info(query: List[str]) -> Generator[_PackageInfo, None, None]:\n    \"\"\"\n    Gather details from installed distributions. Print distribution name,\n    version, location, and installed files. Installed files requires a\n    pip generated 'installed-files.txt' in the distributions '.egg-info'\n    directory.\n    \"\"\"\n    env = get_default_environment()\n\n    installed = {dist.canonical_name: dist for dist in env.iter_all_distributions()}\n    query_names = [canonicalize_name(name) for name in query]\n    missing = sorted(\n        [name for name, pkg in zip(query, query_names) if pkg not in installed]\n    )\n    if missing:\n        logger.warning(\"Package(s) not found: %s\", \", \".join(missing))\n\n    def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:\n        return (\n            dist.metadata[\"Name\"] or \"UNKNOWN\"\n            for dist in installed.values()\n            if current_dist.canonical_name\n            in {canonicalize_name(d.name) for d in dist.iter_dependencies()}\n        )\n\n    for query_name in query_names:\n        try:\n            dist = installed[query_name]\n        except KeyError:\n            continue\n\n        requires = sorted(\n            # Avoid duplicates in requirements (e.g. due to environment markers).\n            {req.name for req in dist.iter_dependencies()},\n            key=str.lower,\n        )\n        required_by = sorted(_get_requiring_packages(dist), key=str.lower)\n\n        try:\n            entry_points_text = dist.read_text(\"entry_points.txt\")\n            entry_points = entry_points_text.splitlines(keepends=False)\n        except FileNotFoundError:\n            entry_points = []\n\n        files_iter = dist.iter_declared_entries()\n        if files_iter is None:\n            files: Optional[List[str]] = None\n        else:\n            files = sorted(files_iter)\n\n        metadata = dist.metadata\n\n        yield _PackageInfo(\n            name=dist.raw_name,\n            version=str(dist.version),\n            location=dist.location or \"\",\n            editable_project_location=dist.editable_project_location,\n            requires=requires,\n            required_by=required_by,\n            installer=dist.installer,\n            metadata_version=dist.metadata_version or \"\",\n            classifiers=metadata.get_all(\"Classifier\", []),\n            summary=metadata.get(\"Summary\", \"\"),\n            homepage=metadata.get(\"Home-page\", \"\"),\n            project_urls=metadata.get_all(\"Project-URL\", []),\n            author=metadata.get(\"Author\", \"\"),\n            author_email=metadata.get(\"Author-email\", \"\"),\n            license=metadata.get(\"License\", \"\"),\n            entry_points=entry_points,\n            files=files,\n        )\n\n\ndef print_results(\n    distributions: Iterable[_PackageInfo],\n    list_files: bool,\n    verbose: bool,\n) -> bool:\n    \"\"\"\n    Print the information from installed distributions found.\n    \"\"\"\n    results_printed = False\n    for i, dist in enumerate(distributions):\n        results_printed = True\n        if i > 0:\n            write_output(\"---\")\n\n        write_output(\"Name: %s\", dist.name)\n        write_output(\"Version: %s\", dist.version)\n        write_output(\"Summary: %s\", dist.summary)\n        write_output(\"Home-page: %s\", dist.homepage)\n        write_output(\"Author: %s\", dist.author)\n        write_output(\"Author-email: %s\", dist.author_email)\n        write_output(\"License: %s\", dist.license)\n        write_output(\"Location: %s\", dist.location)\n        if dist.editable_project_location is not None:\n            write_output(\n                \"Editable project location: %s\", dist.editable_project_location\n            )\n        write_output(\"Requires: %s\", \", \".join(dist.requires))\n        write_output(\"Required-by: %s\", \", \".join(dist.required_by))\n\n        if verbose:\n            write_output(\"Metadata-Version: %s\", dist.metadata_version)\n            write_output(\"Installer: %s\", dist.installer)\n            write_output(\"Classifiers:\")\n            for classifier in dist.classifiers:\n                write_output(\"  %s\", classifier)\n            write_output(\"Entry-points:\")\n            for entry in dist.entry_points:\n                write_output(\"  %s\", entry.strip())\n            write_output(\"Project-URLs:\")\n            for project_url in dist.project_urls:\n                write_output(\"  %s\", project_url)\n        if list_files:\n            write_output(\"Files:\")\n            if dist.files is None:\n                write_output(\"Cannot locate RECORD or installed-files.txt\")\n            else:\n                for line in dist.files:\n                    write_output(\"  %s\", line.strip())\n    return results_printed\n", "path": "src/pip/_internal/commands/show.py"}], "after_files": [{"content": "import logging\nfrom optparse import Values\nfrom typing import Generator, Iterable, Iterator, List, NamedTuple, Optional\n\nfrom pip._vendor.packaging.utils import canonicalize_name\n\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import ERROR, SUCCESS\nfrom pip._internal.metadata import BaseDistribution, get_default_environment\nfrom pip._internal.utils.misc import write_output\n\nlogger = logging.getLogger(__name__)\n\n\nclass ShowCommand(Command):\n    \"\"\"\n    Show information about one or more installed packages.\n\n    The output is in RFC-compliant mail header format.\n    \"\"\"\n\n    usage = \"\"\"\n      %prog [options] <package> ...\"\"\"\n    ignore_require_venv = True\n\n    def add_options(self) -> None:\n        self.cmd_opts.add_option(\n            \"-f\",\n            \"--files\",\n            dest=\"files\",\n            action=\"store_true\",\n            default=False,\n            help=\"Show the full list of installed files for each package.\",\n        )\n\n        self.parser.insert_option_group(0, self.cmd_opts)\n\n    def run(self, options: Values, args: List[str]) -> int:\n        if not args:\n            logger.warning(\"ERROR: Please provide a package name or names.\")\n            return ERROR\n        query = args\n\n        results = search_packages_info(query)\n        if not print_results(\n            results, list_files=options.files, verbose=options.verbose\n        ):\n            return ERROR\n        return SUCCESS\n\n\nclass _PackageInfo(NamedTuple):\n    name: str\n    version: str\n    location: str\n    editable_project_location: Optional[str]\n    requires: List[str]\n    required_by: List[str]\n    installer: str\n    metadata_version: str\n    classifiers: List[str]\n    summary: str\n    homepage: str\n    project_urls: List[str]\n    author: str\n    author_email: str\n    license: str\n    entry_points: List[str]\n    files: Optional[List[str]]\n\n\ndef search_packages_info(query: List[str]) -> Generator[_PackageInfo, None, None]:\n    \"\"\"\n    Gather details from installed distributions. Print distribution name,\n    version, location, and installed files. Installed files requires a\n    pip generated 'installed-files.txt' in the distributions '.egg-info'\n    directory.\n    \"\"\"\n    env = get_default_environment()\n\n    installed = {dist.canonical_name: dist for dist in env.iter_all_distributions()}\n    query_names = [canonicalize_name(name) for name in query]\n    missing = sorted(\n        [name for name, pkg in zip(query, query_names) if pkg not in installed]\n    )\n    if missing:\n        logger.warning(\"Package(s) not found: %s\", \", \".join(missing))\n\n    def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:\n        return (\n            dist.metadata[\"Name\"] or \"UNKNOWN\"\n            for dist in installed.values()\n            if current_dist.canonical_name\n            in {canonicalize_name(d.name) for d in dist.iter_dependencies()}\n        )\n\n    for query_name in query_names:\n        try:\n            dist = installed[query_name]\n        except KeyError:\n            continue\n\n        requires = sorted(\n            # Avoid duplicates in requirements (e.g. due to environment markers).\n            {req.name for req in dist.iter_dependencies()},\n            key=str.lower,\n        )\n        required_by = sorted(_get_requiring_packages(dist), key=str.lower)\n\n        try:\n            entry_points_text = dist.read_text(\"entry_points.txt\")\n            entry_points = entry_points_text.splitlines(keepends=False)\n        except FileNotFoundError:\n            entry_points = []\n\n        files_iter = dist.iter_declared_entries()\n        if files_iter is None:\n            files: Optional[List[str]] = None\n        else:\n            files = sorted(files_iter)\n\n        metadata = dist.metadata\n\n        project_urls = metadata.get_all(\"Project-URL\", [])\n        homepage = metadata.get(\"Home-page\", \"\")\n        if not homepage:\n            # It's common that there is a \"homepage\" Project-URL, but Home-page\n            # remains unset (especially as PEP 621 doesn't surface the field).\n            #\n            # This logic was taken from PyPI's codebase.\n            for url in project_urls:\n                url_label, url = url.split(\",\", maxsplit=1)\n                normalized_label = (\n                    url_label.casefold().replace(\"-\", \"\").replace(\"_\", \"\").strip()\n                )\n                if normalized_label == \"homepage\":\n                    homepage = url.strip()\n                    break\n\n        yield _PackageInfo(\n            name=dist.raw_name,\n            version=str(dist.version),\n            location=dist.location or \"\",\n            editable_project_location=dist.editable_project_location,\n            requires=requires,\n            required_by=required_by,\n            installer=dist.installer,\n            metadata_version=dist.metadata_version or \"\",\n            classifiers=metadata.get_all(\"Classifier\", []),\n            summary=metadata.get(\"Summary\", \"\"),\n            homepage=homepage,\n            project_urls=project_urls,\n            author=metadata.get(\"Author\", \"\"),\n            author_email=metadata.get(\"Author-email\", \"\"),\n            license=metadata.get(\"License\", \"\"),\n            entry_points=entry_points,\n            files=files,\n        )\n\n\ndef print_results(\n    distributions: Iterable[_PackageInfo],\n    list_files: bool,\n    verbose: bool,\n) -> bool:\n    \"\"\"\n    Print the information from installed distributions found.\n    \"\"\"\n    results_printed = False\n    for i, dist in enumerate(distributions):\n        results_printed = True\n        if i > 0:\n            write_output(\"---\")\n\n        write_output(\"Name: %s\", dist.name)\n        write_output(\"Version: %s\", dist.version)\n        write_output(\"Summary: %s\", dist.summary)\n        write_output(\"Home-page: %s\", dist.homepage)\n        write_output(\"Author: %s\", dist.author)\n        write_output(\"Author-email: %s\", dist.author_email)\n        write_output(\"License: %s\", dist.license)\n        write_output(\"Location: %s\", dist.location)\n        if dist.editable_project_location is not None:\n            write_output(\n                \"Editable project location: %s\", dist.editable_project_location\n            )\n        write_output(\"Requires: %s\", \", \".join(dist.requires))\n        write_output(\"Required-by: %s\", \", \".join(dist.required_by))\n\n        if verbose:\n            write_output(\"Metadata-Version: %s\", dist.metadata_version)\n            write_output(\"Installer: %s\", dist.installer)\n            write_output(\"Classifiers:\")\n            for classifier in dist.classifiers:\n                write_output(\"  %s\", classifier)\n            write_output(\"Entry-points:\")\n            for entry in dist.entry_points:\n                write_output(\"  %s\", entry.strip())\n            write_output(\"Project-URLs:\")\n            for project_url in dist.project_urls:\n                write_output(\"  %s\", project_url)\n        if list_files:\n            write_output(\"Files:\")\n            if dist.files is None:\n                write_output(\"Cannot locate RECORD or installed-files.txt\")\n            else:\n                for line in dist.files:\n                    write_output(\"  %s\", line.strip())\n    return results_printed\n", "path": "src/pip/_internal/commands/show.py"}]}