Skip to content

Commit 2de81af

Browse files
authored
Merge pull request #7348 from sinoroc/fix-doc-links-index-options
Fix documentation links for index options
2 parents ee82715 + 72e8510 commit 2de81af

File tree

8 files changed

+26
-20
lines changed

8 files changed

+26
-20
lines changed

docs/html/development/architecture/package-finding.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ file to download for a package, given a requirement:
1717

1818
1. Collect together the various network and file system locations containing
1919
project package files. These locations are derived, for example, from pip's
20-
:ref:`--index-url <--index-url>` (with default https://pypi.org/simple/ )
21-
setting and any configured :ref:`--extra-index-url <--extra-index-url>`
22-
locations. Each of the project page URL's is an HTML page of anchor links,
23-
as defined in `PEP 503`_, the "Simple Repository API."
20+
:ref:`--index-url <install_--index-url>` (with default
21+
https://pypi.org/simple/ ) setting and any configured
22+
:ref:`--extra-index-url <install_--extra-index-url>` locations. Each of the
23+
project page URL's is an HTML page of anchor links, as defined in
24+
`PEP 503`_, the "Simple Repository API."
2425
2. For each project page URL, fetch the HTML and parse out the anchor links,
2526
creating a ``Link`` object from each one. The :ref:`LinkCollector
2627
<link-collector-class>` class is responsible for both the previous step
@@ -128,9 +129,9 @@ responsible for collecting the raw list of "links" to package files
128129
`PEP 503`_ project page URL's that ``PackageFinder`` should access.
129130

130131
The ``LinkCollector`` class takes into account the user's :ref:`--find-links
131-
<--find-links>`, :ref:`--extra-index-url <--extra-index-url>`, and related
132-
options when deciding which locations to collect links from. The class's main
133-
method is the ``collect_links()`` method. The :ref:`PackageFinder
132+
<install_--find-links>`, :ref:`--extra-index-url <install_--extra-index-url>`,
133+
and related options when deciding which locations to collect links from. The
134+
class's main method is the ``collect_links()`` method. The :ref:`PackageFinder
134135
<package-finder-class>` class invokes this method as the first step of its
135136
``find_all_candidates()`` method.
136137

docs/html/reference/pip_download.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Options
4747

4848
.. pip-command-options:: download
4949

50-
.. pip-index-options::
50+
.. pip-index-options:: download
5151

5252

5353
Examples

docs/html/reference/pip_install.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ To interpret the requirements file in UTF-8 format add a comment
153153

154154
The following options are supported:
155155

156-
* :ref:`-i, --index-url <--index-url>`
157-
* :ref:`--extra-index-url <--extra-index-url>`
158-
* :ref:`--no-index <--no-index>`
159-
* :ref:`-f, --find-links <--find-links>`
156+
* :ref:`-i, --index-url <install_--index-url>`
157+
* :ref:`--extra-index-url <install_--extra-index-url>`
158+
* :ref:`--no-index <install_--no-index>`
159+
* :ref:`-f, --find-links <install_--find-links>`
160160
* :ref:`--no-binary <install_--no-binary>`
161161
* :ref:`--only-binary <install_--only-binary>`
162-
* :ref:`--require-hashes <--require-hashes>`
162+
* :ref:`--require-hashes <install_--require-hashes>`
163163
* :ref:`--trusted-host <--trusted-host>`
164164

165-
For example, to specify :ref:`--no-index <--no-index>` and two
166-
:ref:`--find-links <--find-links>` locations:
165+
For example, to specify :ref:`--no-index <install_--no-index>` and two
166+
:ref:`--find-links <install_--find-links>` locations:
167167

168168
::
169169

@@ -824,7 +824,7 @@ Options
824824

825825
.. pip-command-options:: install
826826

827-
.. pip-index-options::
827+
.. pip-index-options:: install
828828

829829

830830
.. _`pip install Examples`:

docs/html/reference/pip_list.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Options
2020

2121
.. pip-command-options:: list
2222

23-
.. pip-index-options::
23+
.. pip-index-options:: list
2424

2525

2626
Examples

docs/html/reference/pip_wheel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Options
5959

6060
.. pip-command-options:: wheel
6161

62-
.. pip-index-options::
62+
.. pip-index-options:: wheel
6363

6464

6565
Examples

docs/html/user_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ $ pip wheel --wheel-dir DIR -r requirements.txt
515515

516516

517517
Then, to install from local only, you'll be using :ref:`--find-links
518-
<--find-links>` and :ref:`--no-index <--no-index>` like so::
518+
<install_--find-links>` and :ref:`--no-index <install_--no-index>` like so::
519519

520520
$ pip install --no-index --find-links=DIR -r requirements.txt
521521

docs/pip_sphinxext.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ def process_options(self):
8686

8787

8888
class PipIndexOptions(PipOptions):
89+
required_arguments = 1
90+
8991
def process_options(self):
92+
cmd_name = self.arguments[0]
9093
self._format_options(
91-
[o() for o in cmdoptions.index_group['options']]
94+
[o() for o in cmdoptions.index_group['options']],
95+
cmd_name=cmd_name,
9296
)
9397

9498

news/7347.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix documentation links for index options

0 commit comments

Comments
 (0)