Skip to content

Commit ac6eb84

Browse files
committed
Add 'pypi' Sphinx role
1 parent 8d08122 commit ac6eb84

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ def setup(app):
338338
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
339339
"issue": (_repo + "issues/%s", "#%s"),
340340
"pr": (_repo + "pull/%s", "#%s"),
341+
"pypi": ("https://pypi.org/project/%s/", "%s"),
341342
}
342343

343344
# sphinxext.opengraph

docs/deprecations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,6 @@ PIL.OleFileIO
443443
.. versionremoved:: 6.0.0
444444

445445
PIL.OleFileIO was removed as a vendored file in Pillow 4.0.0 (2017-01) in favour of
446-
the upstream olefile Python package, and replaced with an ``ImportError`` in 5.0.0
446+
the upstream :pypi:`olefile` Python package, and replaced with an ``ImportError`` in 5.0.0
447447
(2018-01). The deprecated file has now been removed from Pillow. If needed, install from
448448
PyPI (eg. ``python3 -m pip install olefile``).

docs/handbook/image-file-formats.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ Pillow reads Kodak FlashPix files. In the current version, only the highest
12961296
resolution image is read from the file, and the viewing transform is not taken
12971297
into account.
12981298

1299-
To enable FPX support, you must install olefile.
1299+
To enable FPX support, you must install :pypi:`olefile`.
13001300

13011301
.. note::
13021302

@@ -1374,7 +1374,7 @@ the first sprite in the file is loaded. You can use :py:meth:`~PIL.Image.Image.s
13741374

13751375
Note that there may be an embedded gamma of 2.2 in MIC files.
13761376

1377-
To enable MIC support, you must install olefile.
1377+
To enable MIC support, you must install :pypi:`olefile`.
13781378

13791379
MPO
13801380
^^^

docs/reference/ImageFont.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ this class store bitmap fonts, and are used with the
1010

1111
PIL uses its own font file format to store bitmap fonts, limited to 256 characters. You can use
1212
`pilfont.py <https://github.com/python-pillow/pillow-scripts/blob/main/Scripts/pilfont.py>`_
13-
from `pillow-scripts <https://pypi.org/project/pillow-scripts/>`_ to convert BDF and
13+
from :pypi:`pillow-scripts` to convert BDF and
1414
PCF font descriptors (X window font formats) to this format.
1515

1616
Starting with version 1.1.4, PIL can be configured to support TrueType and

docs/releasenotes/4.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Pillow 4.0 supports Python 3.6.
1717
OleFileIO.py
1818
============
1919

20-
OleFileIO.py has been removed as a vendored file and is now installed
21-
from the upstream olefile pypi package. All internal dependencies are
20+
``OleFileIO.py`` has been removed as a vendored file and is now installed
21+
from the upstream :pypi:`olefile` PyPI package. All internal dependencies are
2222
redirected to the olefile package. Direct accesses to
2323
``PIL.OlefileIO`` raises a deprecation warning, then patches the
2424
upstream olefile into ``sys.modules`` in its place.

docs/releasenotes/5.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Scripts
2828

2929
The scripts formerly installed by Pillow have been split into a
3030
separate package, pillow-scripts, living at
31-
https://github.com/python-pillow/pillow-scripts .
31+
https://github.com/python-pillow/pillow-scripts.
3232

3333

3434
API Changes
@@ -37,7 +37,7 @@ API Changes
3737
OleFileIO.py
3838
^^^^^^^^^^^^
3939

40-
The olefile module is no longer a required dependency when installing Pillow.
40+
The :pypi:`olefile` module is no longer a required dependency when installing Pillow.
4141
Support for plugins requiring olefile will not be loaded if it is not
4242
installed. This allows library consumers to avoid installing this dependency
4343
if they choose. Some library consumers have little interest in the format

docs/releasenotes/6.0.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Pillow for Python 3.4 is 5.4.1.
1414
Removed deprecated PIL.OleFileIO
1515
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616

17-
PIL.OleFileIO was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of
18-
the upstream olefile Python package, and replaced with an ``ImportError``. The
17+
``PIL.OleFileIO`` was removed as a vendored file and in Pillow 4.0.0 (2017-01) in favour of
18+
the upstream :pypi:`olefile` Python package, and replaced with an :py:exc:`ImportError`. The
1919
deprecated file has now been removed from Pillow. If needed, install from PyPI (eg.
2020
``python3 -m pip install olefile``).
2121

0 commit comments

Comments
 (0)