Skip to content

Commit 3f515c4

Browse files
authored
Merge pull request #975 from meowmeowmeowcat/fix-broken-link
Use more intersphinx references & format some links
2 parents 9ad3306 + b82a3cc commit 3f515c4

30 files changed

Lines changed: 145 additions & 140 deletions

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ http://packaging.python.org
66
The "Python Packaging User Guide" (PyPUG) aims to be the authoritative resource on
77
how to package and install distributions in Python using current tools.
88

9-
To follow the development of Python packaging, see the `Python
10-
Packaging Authority <https://www.pypa.io>`_.
9+
To follow the development of Python packaging, see the :doc:`Python
10+
Packaging Authority <pypa:index>`.
1111

1212
Code of Conduct
1313
---------------

source/conf.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,34 @@
398398

399399
# Example configuration for intersphinx: refer to the Python standard library.
400400
intersphinx_mapping = {
401+
'boltons': ('https://boltons.readthedocs.io/en/latest/', None),
402+
'build': ('https://pypa-build.readthedocs.io/en/stable/', None),
403+
'cffi': ('https://cffi.readthedocs.io/en/latest/', None),
404+
'conda': ('https://conda.io/en/latest/', None),
405+
'devpi': ('https://devpi.net/docs/devpi/devpi/latest/+doc', None),
406+
'dh-virtualenv': ('https://dh-virtualenv.readthedocs.io/en/latest/', None),
407+
'distlib': ('https://distlib.readthedocs.io/en/latest/', None),
408+
'flexx': ('https://flexx.readthedocs.io/en/latest/', None),
409+
'nox': ('https://nox.thea.codes/en/latest/', None),
401410
'openstack': ('https://docs.openstack.org/glance/latest/', None),
411+
'packaging': ('https://packaging.pypa.io/en/latest/', None),
412+
'packaging.python.org': ('https://packaging.python.org/', None),
413+
'pip': ('https://pip.pypa.io/en/latest/', None),
414+
'pipenv': ('https://pipenv.pypa.io/en/latest/', None),
415+
'piwheels': ('https://piwheels.readthedocs.io/en/latest/', None),
416+
'pybind11': ('https://pybind11.readthedocs.io/en/stable/', None),
417+
'pynsist': ('https://pynsist.readthedocs.io/en/latest/', None),
418+
'pypa': ('https://www.pypa.io/en/latest/', None),
402419
'python': ('https://docs.python.org/3', None),
420+
'python-guide': ('https://docs.python-guide.org', None),
403421
'python2': ('https://docs.python.org/2', None),
404-
'pip': ('https://pip.pypa.io/en/latest/', None),
405422
'scipy': ('https://www.scipy.org', None),
406423
'setuptools': ('https://setuptools.readthedocs.io/en/latest/', None),
424+
'spack': ('https://spack.readthedocs.io/en/latest/', None),
425+
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
407426
'tox': ('https://tox.readthedocs.io/en/latest/', None),
408427
'twine': ('https://twine.readthedocs.io/en/stable/', None),
428+
'virtualenv': ('https://virtualenv.pypa.io/en/stable/', None),
409429
}
410430

411431

source/contribute.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Most of the work on the |PyPUG| takes place on the
1818
`open issues`__ and `pull requests`__. If you're planning to write or edit
1919
the guide, please read the :ref:`style guide <contributing_style_guide>`.
2020

21-
.. __: https://github.com/pypa/python-packaging-user-guide/
22-
.. __: https://github.com/pypa/python-packaging-user-guide/issues
23-
.. __: https://github.com/pypa/python-packaging-user-guide/pulls
21+
.. __: https://github.com/pypa/packaging.python.org/
22+
.. __: https://github.com/pypa/packaging.python.org/issues
23+
.. __: https://github.com/pypa/packaging.python.org/pulls
2424

2525
By contributing to the |PyPUG|, you're expected to follow the PSF's
2626
`Code of Conduct`__.
@@ -124,19 +124,16 @@ Though not required to contribute, it may be useful to build this guide locally
124124
in order to test your changes. In order to build this guide locally, you'll
125125
need:
126126

127-
1. `Nox <https://nox.readthedocs.io/en/latest/>`_. You can install or upgrade
127+
1. :doc:`Nox <nox:index>`. You can install or upgrade
128128
nox using ``pip``:
129129

130130
.. code-block:: bash
131131
132132
python -m pip install --user nox
133133
134134
2. Python 3.6. Our build scripts are designed to work with Python 3.6 only.
135-
See the `Hitchhiker's Guide to Python installation instructions`_ to install
136-
Python 3.6 on your operating system.
137-
138-
.. _Hitchhiker's Guide to Python installation instructions:
139-
http://docs.python-guide.org/en/latest/starting/installation/
135+
See the :doc:`Hitchhiker's Guide to Python installation instructions <python-guide:starting/installation>`
136+
to install Python 3.6 on your operating system.
140137

141138
To build the guide, run the following bash command in the source folder:
142139

source/discussions/deploying-python-applications.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ directory, independent of any other Python installation on the computer.
7373

7474
A big advantage of Pynsist is that the Windows packages can be built on Linux.
7575
There are several examples for different kinds of programs (console, GUI) in
76-
the `documentation <https://pynsist.readthedocs.io>`__. The tool is released
76+
the `documentation <pynsist:index>`. The tool is released
7777
under the MIT-licence.
7878

7979
Application bundles

source/discussions/install-requires-vs-requirements.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ installs them using ``python -m pip install -r``.
8888
----
8989

9090
.. [1] For more on "Abstract" vs "Concrete" requirements, see
91-
https://caremad.io/2013/07/setup-vs-requirement/.
91+
https://caremad.io/posts/2013/07/setup-vs-requirement/.

source/discussions/wheel-vs-egg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Here's a breakdown of the important differences between :term:`Wheel` and :term:
3939
specification and the implementation that packaged it.
4040

4141
* :term:`Wheel` is internally organized by `sysconfig path type
42-
<http://docs.python.org/2/library/sysconfig.html#installation-paths>`_,
42+
<https://docs.python.org/2/library/sysconfig.html#installation-paths>`_,
4343
therefore making it easier to convert to other formats.
4444

4545
----

source/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Glossary
128128

129129
PyPA is a working group that maintains many of the relevant
130130
projects in Python packaging. They maintain a site at
131-
https://www.pypa.io, host projects on `GitHub
131+
:doc:`pypa.io <pypa:index>`, host projects on `GitHub
132132
<https://github.com/pypa>`_ and `Bitbucket
133133
<https://bitbucket.org/pypa>`_, and discuss issues on the
134134
`distutils-sig mailing list

source/guides/analyzing-pypi-package-downloads.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ In order to use `Google BigQuery`_ to query the `public PyPI download
5353
statistics dataset`_, you'll need a Google account and to enable the BigQuery
5454
API on a Google Cloud Platform project. You can run the up to 1TB of queries
5555
per month `using the BigQuery free tier without a credit card
56-
<https://cloud.google.com/blog/big-data/2017/01/how-to-run-a-terabyte-of-google-bigquery-queries-each-month-without-a-credit-card>`__
56+
<https://cloud.google.com/blog/products/data-analytics/query-without-a-credit-card-introducing-bigquery-sandbox>`__
5757

5858
- Navigate to the `BigQuery web UI`_.
5959
- Create a new project.

source/guides/creating-and-discovering-plugins.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ a list of packages to :func:`setup`'s ``packages`` argument instead of using
120120
Using package metadata
121121
======================
122122

123-
`Setuptools`_ provides :doc:`special support
123+
:doc:`Setuptools <setuptools:index>` provides :doc:`special support
124124
<setuptools:userguide/entry_point>` for plugins. By providing the
125125
``entry_points`` argument to :func:`setup` in :file:`setup.py` plugins can
126126
register themselves for discovery.
@@ -171,5 +171,4 @@ Now the module of your choice can be imported by executing
171171
<python:library/importlib.metadata>`, most packaging tools other than setuptools
172172
provide support for defining entry points.
173173

174-
.. _Setuptools: https://setuptools.readthedocs.io
175174
.. _backport: https://importlib-metadata.readthedocs.io/en/latest/

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setup.py
5757

5858
The most important file is :file:`setup.py` which exists at the root of your
5959
project directory. For an example, see the `setup.py
60-
<https://github.com/pypa/sampleproject/blob/master/setup.py>`_ in the `PyPA
60+
<https://github.com/pypa/sampleproject/blob/main/setup.py>`_ in the `PyPA
6161
sample project <https://github.com/pypa/sampleproject>`_.
6262

6363
:file:`setup.py` serves two primary functions:
@@ -78,7 +78,7 @@ setup.cfg
7878

7979
:file:`setup.cfg` is an ini file that contains option defaults for
8080
:file:`setup.py` commands. For an example, see the `setup.cfg
81-
<https://github.com/pypa/sampleproject/blob/master/setup.cfg>`_ in the `PyPA
81+
<https://github.com/pypa/sampleproject/blob/main/setup.cfg>`_ in the `PyPA
8282
sample project <https://github.com/pypa/sampleproject>`_.
8383

8484

@@ -87,13 +87,13 @@ README.rst / README.md
8787

8888
All projects should contain a readme file that covers the goal of the project.
8989
The most common format is `reStructuredText
90-
<http://docutils.sourceforge.net/rst.html>`_ with an "rst" extension, although
90+
<https://docutils.sourceforge.io/rst.html>`_ with an "rst" extension, although
9191
this is not a requirement; multiple variants of `Markdown
9292
<https://daringfireball.net/projects/markdown/>`_ are supported as well (look
9393
at ``setup()``'s :ref:`long_description_content_type <description>` argument).
9494

9595
For an example, see `README.md
96-
<https://github.com/pypa/sampleproject/blob/master/README.md>`_ from the `PyPA
96+
<https://github.com/pypa/sampleproject/blob/main/README.md>`_ from the `PyPA
9797
sample project <https://github.com/pypa/sampleproject>`_.
9898

9999
.. note:: Projects using :ref:`setuptools` 0.6.27+ have standard readme files
@@ -113,7 +113,7 @@ writing a :file:`MANIFEST.in` file, including a list of what's included by
113113
default, see ":ref:`Using MANIFEST.in`".
114114

115115
For an example, see the `MANIFEST.in
116-
<https://github.com/pypa/sampleproject/blob/master/MANIFEST.in>`_ from the `PyPA
116+
<https://github.com/pypa/sampleproject/blob/main/MANIFEST.in>`_ from the `PyPA
117117
sample project <https://github.com/pypa/sampleproject>`_.
118118

119119
.. note:: :file:`MANIFEST.in` does not affect binary distributions such as wheels.
@@ -128,7 +128,7 @@ If you're unsure which license to choose, you can use resources such as
128128
`GitHub's Choose a License <https://choosealicense.com/>`_ or consult a lawyer.
129129

130130
For an example, see the `LICENSE.txt
131-
<https://github.com/pypa/sampleproject/blob/master/LICENSE.txt>`_ from the `PyPA
131+
<https://github.com/pypa/sampleproject/blob/main/LICENSE.txt>`_ from the `PyPA
132132
sample project <https://github.com/pypa/sampleproject>`_.
133133

134134
<your package>
@@ -139,7 +139,7 @@ Python modules and packages under a single top-level package that has the same
139139
:ref:`name <setup() name>` as your project, or something very close.
140140

141141
For an example, see the `sample
142-
<https://github.com/pypa/sampleproject/tree/master/src/sample>`_ package that's
142+
<https://github.com/pypa/sampleproject/tree/main/src/sample>`_ package that's
143143
included in the `PyPA sample project <https://github.com/pypa/sampleproject>`_.
144144

145145

@@ -154,7 +154,7 @@ specific details of your project are defined.
154154

155155
The most relevant arguments are explained below. Most of the snippets given are
156156
taken from the `setup.py
157-
<https://github.com/pypa/sampleproject/blob/master/setup.py>`_ contained in the
157+
<https://github.com/pypa/sampleproject/blob/main/setup.py>`_ contained in the
158158
`PyPA sample project <https://github.com/pypa/sampleproject>`_.
159159

160160

@@ -237,7 +237,7 @@ A `content type
237237
can be specified with the ``long_description_content_type`` argument, which can
238238
be one of ``text/plain``, ``text/x-rst``, or ``text/markdown``, corresponding
239239
to no formatting, `reStructuredText (reST)
240-
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#reference-names>`_,
240+
<https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#reference-names>`_,
241241
and the Github-flavored Markdown dialect of `Markdown
242242
<https://daringfireball.net/projects/markdown/>`_ respectively.
243243

@@ -476,8 +476,8 @@ and it is interpreted relative to the installation prefix
476476
Each file name in ``files`` is interpreted relative to the :file:`setup.py`
477477
script at the top of the project source distribution.
478478

479-
For more information see the distutils section on `Installing Additional Files
480-
<http://docs.python.org/3/distutils/setupscript.html#installing-additional-files>`_.
479+
For more information see the distutils section on :ref:`Installing Additional Files
480+
<python:distutils-additional-files>`.
481481

482482
.. note::
483483

@@ -490,8 +490,8 @@ For more information see the distutils section on `Installing Additional Files
490490
``scripts``
491491
~~~~~~~~~~~
492492

493-
Although ``setup()`` supports a `scripts
494-
<http://docs.python.org/3/distutils/setupscript.html#installing-scripts>`_
493+
Although ``setup()`` supports a :ref:`scripts
494+
<python:distutils-installing-scripts>`
495495
keyword for pointing to pre-made scripts to install, the recommended approach to
496496
achieve cross-platform compatibility is to use :ref:`console_scripts` entry
497497
points (see below).
@@ -576,7 +576,7 @@ Semantic versioning (preferred)
576576
*******************************
577577

578578
For new projects, the recommended versioning scheme is based on `Semantic Versioning
579-
<http://semver.org>`_, but adopts a different approach to handling pre-releases and
579+
<https://semver.org/>`_, but adopts a different approach to handling pre-releases and
580580
build metadata.
581581

582582
The essence of semantic versioning is a 3-part MAJOR.MINOR.MAINTENANCE numbering scheme,
@@ -592,7 +592,7 @@ Adopting this approach as a project author allows users to make use of :pep:`"co
592592
a matching MAJOR version.
593593

594594
Python projects adopting semantic versioning should abide by clauses 1-8 of the
595-
`Semantic Versioning 2.0.0 specification <http://semver.org>`_.
595+
`Semantic Versioning 2.0.0 specification <https://semver.org/>`_.
596596

597597
Date based versioning
598598
*********************

0 commit comments

Comments
 (0)