Skip to content

Commit f54c752

Browse files
committed
Use intersphinx references
1 parent 33dbcf5 commit f54c752

10 files changed

Lines changed: 34 additions & 40 deletions

source/glossary.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ Glossary
4242
Egg
4343

4444
A :term:`Built Distribution` format introduced by :ref:`setuptools`,
45-
which is being replaced by :term:`Wheel`. For details, see `The
46-
Internal Structure of Python Eggs
47-
<https://setuptools.readthedocs.io/en/latest/deprecated/python_eggs.html>`_ and
45+
which is being replaced by :term:`Wheel`. For details, see `
46+
:doc:`The Internal Structure of Python Eggs <setuptools:deprecated/python_eggs>` and
4847
`Python Eggs <http://peak.telecommunity.com/DevCenter/PythonEggs>`_
4948

5049
Extension Module

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ points (see below).
509509
Use this keyword to specify any plugins that your project provides for any named
510510
entry points that may be defined by your project or others that you depend on.
511511

512-
For more information, see the section on `Advertising Behavior
513-
<https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html#dynamic-discovery-of-services-and-plugins>`_
512+
For more information, see the section on
513+
:ref:`Advertising Behavior <setuptools:dynamic discovery of services and plugins>`
514514
from the :ref:`setuptools` docs.
515515

516516
The most commonly used entry point is "console_scripts" (see below).
@@ -528,16 +528,16 @@ The most commonly used entry point is "console_scripts" (see below).
528528
],
529529
},
530530

531-
Use ``console_script`` `entry points
532-
<https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins>`_
531+
Use ``console_script``
532+
:ref:`entry points <setuptools:dynamic discovery of services and plugins>`
533533
to register your script interfaces. You can then let the toolchain handle the
534534
work of turning these interfaces into actual scripts [2]_. The scripts will be
535535
generated during the install of your :term:`distribution <Distribution
536536
Package>`.
537537

538538
For more information, see `Automatic Script Creation
539539
<https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation>`_
540-
from the `setuptools docs <https://setuptools.readthedocs.io>`_.
540+
from the :doc:`setuptools docs <setuptools:index>`.
541541

542542
.. _`Choosing a versioning scheme`:
543543

@@ -706,9 +706,9 @@ Lastly, if you don't want to install any dependencies at all, you can run:
706706
python -m pip install -e . --no-deps
707707
708708
709-
For more information, see the `Development Mode
710-
<https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode>`_ section
711-
of the `setuptools docs <https://setuptools.readthedocs.io>`_.
709+
For more information, see the
710+
:doc:`<Development Mode <setuptools:userguide/development_mode>` section
711+
of the :doc:`setuptools docs <setuptools>`.
712712

713713
.. _`Packaging your project`:
714714

source/guides/index-mirrors-and-caches.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ Caching with pip
2929
pip provides a number of facilities for speeding up installation by using local
3030
cached copies of :term:`packages <Distribution Package>`:
3131

32-
1. `Fast & local installs
33-
<https://pip.pypa.io/en/latest/user_guide/#installing-from-local-packages>`_
32+
1. :ref:`Fast & local installs <pip:installing from local packages>`
3433
by downloading all the requirements for a project and then pointing pip at
3534
those downloaded files instead of going to PyPI.
3635
2. A variation on the above which pre-builds the installation files for

source/guides/installing-using-pip-and-virtual-environments.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ pip can install a package directly from source, for example:
323323
cd google-auth
324324
py -m pip install .
325325
326-
Additionally, pip can install packages from source in `development mode`_,
326+
Additionally, pip can install packages from source in
327+
:doc:`development mode <setuptools:userguide/development_mode>`,
327328
meaning that changes to the source directory will immediately affect the
328329
installed package without needing to re-install:
329330

@@ -339,9 +340,6 @@ installed package without needing to re-install:
339340
340341
py -m pip install --editable .
341342
342-
.. _development mode:
343-
https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
344-
345343
346344
Installing from version control systems
347345
---------------------------------------

source/guides/packaging-binary-extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ above to make the interface available as an importable Python module.
221221
Implementing binary extensions
222222
==============================
223223

224-
The CPython `Extending and Embedding <https://docs.python.org/3/extending/>`_
224+
The CPython :doc:`Extending and Embedding <python:extending/index>`
225225
guide includes an introduction to writing a
226-
`custom extension module in C <https://docs.python.org/3/extending/extending.html>`_.
226+
:doc:`custom extension module in C <python:extending/extending>`.
227227

228228
::
229229

source/guides/packaging-namespace-packages.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ the `native namespace package example project`_.
128128
pkgutil-style namespace packages
129129
--------------------------------
130130

131-
Python 2.3 introduced the `pkgutil`_ module and the
132-
`extend_path`_ function. This can be used to declare namespace
131+
Python 2.3 introduced the :doc:`pkgutil <python:library/pkgutil>` module and the
132+
:py:func:`python:pkgutil.extend_path` function. This can be used to declare namespace
133133
packages that need to be compatible with both Python 2.3+ and Python 3. This
134134
is the recommended approach for the highest level of compatibility.
135135

@@ -160,7 +160,6 @@ additional code in :file:`__init__.py` will be inaccessible.
160160
A complete working example of two pkgutil-style namespace packages can be found
161161
in the `pkgutil namespace example project`_.
162162

163-
.. _pkgutil: https://docs.python.org/3/library/pkgutil.html
164163
.. _extend_path:
165164
https://docs.python.org/3/library/pkgutil.html#pkgutil.extend_path
166165
.. _pkgutil namespace example project:

source/guides/tool-recommendations.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Installation tool recommendations
3131
is installed, you may need to also install :ref:`wheel` to get the benefit
3232
of wheel caching. [3]_
3333

34-
* Use :ref:`virtualenv`, or `venv`_ to isolate application specific
35-
dependencies from a shared Python installation. [4]_
34+
* Use :ref:`virtualenv`, or :doc:`venv <python:library/venv>` to isolate application
35+
specific dependencies from a shared Python installation. [4]_
3636

3737
* If you're looking for management of fully integrated cross-platform software
3838
stacks, consider:
@@ -111,4 +111,3 @@ migration, and what settings to change in your clients.
111111
choice for packaging.
112112
113113
.. _distribute: https://pypi.org/project/distribute
114-
.. _venv: https://docs.python.org/3/library/venv.html

source/overview.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ you can use Python's native packaging tools to create a *source*
9494

9595
Python's *sdists* are compressed archives (``.tar.gz`` files)
9696
containing one or more packages or modules. If your code is
97-
pure-Python, and you only depend on other Python packages, you can `go
98-
here to learn more <https://docs.python.org/3/distutils/sourcedist.html>`_.
97+
pure-Python, and you only depend on other Python packages, you can
98+
:doc:`go here to learn more <python:distutils/sourcedist>`.
9999

100100
If you rely on any non-Python code, or non-Python packages (such as
101101
`libxml2 <https://en.wikipedia.org/wiki/Libxml2>`_ in the case of
@@ -166,8 +166,8 @@ audience.
166166
Python's native packaging is mostly built for distributing reusable
167167
code, called libraries, between developers. You can piggyback
168168
**tools**, or basic applications for developers, on top of Python's
169-
library packaging, using technologies like `setuptools entry_points
170-
<https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html>`_.
169+
library packaging, using technologies like
170+
:doc:`setuptools entry_points <userguide/entry_point>`.
171171

172172
Libraries are building blocks, not complete applications. For
173173
distributing applications, there's a whole new world of technologies
@@ -249,7 +249,7 @@ machines of developers and data scientists.
249249
Technologies which support this model:
250250

251251
* `PEX <https://github.com/pantsbuild/pex#pex>`_ (Python EXecutable)
252-
* `zipapp <https://docs.python.org/3/library/zipapp.html>`_ (does not help manage dependencies, requires Python 3.5+)
252+
* :doc:`zipapp <python:library/zipapp>` (does not help manage dependencies, requires Python 3.5+)
253253
* `shiv <https://github.com/linkedin/shiv#shiv>`_ (requires Python 3)
254254

255255
.. note:: Of all the approaches here, depending on a pre-installed

source/tutorials/installing-packages.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Optionally, create a virtual environment
178178
----------------------------------------
179179

180180
See :ref:`section below <Creating and using Virtual Environments>` for details,
181-
but here's the basic `venv`_ [3]_ command to use on a typical Linux system:
181+
but here's the basic :doc:`venv <python:library/venv>` [3]_ command to use on a typical Linux system:
182182

183183
.. tab:: Unix/macOS
184184

@@ -228,7 +228,7 @@ environments.
228228

229229
Currently, there are two common tools for creating Python virtual environments:
230230

231-
* `venv`_ is available by default in Python 3.3 and later, and installs
231+
* :doc:`venv <python:library/venv>` is available by default in Python 3.3 and later, and installs
232232
:ref:`pip` and :ref:`setuptools` into created virtual environments in
233233
Python 3.4 and later.
234234
* :ref:`virtualenv` needs to be installed separately, but supports Python 2.7+
@@ -238,7 +238,7 @@ Currently, there are two common tools for creating Python virtual environments:
238238

239239
The basic usage is like so:
240240

241-
Using `venv`_:
241+
Using :doc:`venv <python:library/venv>`:
242242

243243
.. tab:: Unix/macOS
244244

@@ -270,7 +270,8 @@ Using :ref:`virtualenv`:
270270
virtualenv <DIR>
271271
<DIR>\Scripts\activate
272272
273-
For more information, see the `venv`_ docs or the `virtualenv <http://virtualenv.pypa.io>`_ docs.
273+
For more information, see the :doc:`venv <python:library/venv>` docs or
274+
the `virtualenv <http://virtualenv.pypa.io>`_ docs.
274275

275276
The use of :command:`source` under Unix shells ensures
276277
that the virtual environment's variables are set within the current
@@ -297,7 +298,7 @@ Use pip for Installing
297298
======================
298299

299300
:ref:`pip` is the recommended installer. Below, we'll cover the most common
300-
usage scenarios. For more detail, see the `pip docs <https://pip.pypa.io>`_,
301+
usage scenarios. For more detail, see the :doc:`pip docs <pip:index>`,
301302
which includes a complete :doc:`Reference Guide <pip:cli/index>`.
302303

303304

@@ -542,8 +543,8 @@ Installing from a local src tree
542543
================================
543544

544545

545-
Installing from local src in `Development Mode
546-
<https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode>`_,
546+
Installing from local src in
547+
:doc:`Development Mode <setuptools:userguide/development_mode>`,
547548
i.e. in such a way that the project appears to be installed, but yet is
548549
still editable from the src tree.
549550

@@ -682,5 +683,4 @@ Install `setuptools extras`_.
682683
and support was released in :ref:`setuptools` v8.0 and
683684
:ref:`pip` v6.0
684685
685-
.. _venv: https://docs.python.org/3/library/venv.html
686686
.. _setuptools extras: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies

source/tutorials/managing-dependencies.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ Use ``pip`` to install Pipenv:
5353

5454
.. Note:: This does a `user installation`_ to prevent breaking any system-wide
5555
packages. If ``pipenv`` isn't available in your shell after installation,
56-
you'll need to add the `user base`_'s binary directory to your ``PATH``.
56+
you'll need to add the :py:data:`user base <python:site.USER_BASE>`'s
57+
binary directory to your ``PATH``.
5758
See :ref:`Installing to the User Site` for more information.
5859

5960
.. _npm: https://www.npmjs.com/
6061
.. _bundler: http://bundler.io/
61-
.. _user base: https://docs.python.org/3/library/site.html#site.USER_BASE
6262
.. _user installation: https://pip.pypa.io/en/stable/user_guide/#user-installs
6363

6464
Installing packages for your project

0 commit comments

Comments
 (0)