Skip to content

Commit 553b700

Browse files
docs: Add a few intersphinx links to the Python Packaging User Guide (#804)
* Add a few intersphinx links to the Python Packaging User Guide * docs: fix forward reference * Update _types.py --------- Co-authored-by: Henry Schreiner <[email protected]>
1 parent 336efcb commit 553b700

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
intersphinx_mapping = {
4242
'python': ('https://docs.python.org/3/', None),
43+
'packaging': ('https://packaging.python.org/en/latest/', None),
4344
}
4445

4546
# Add any paths that contain templates here, relative to this directory.

docs/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
build
55
*****
66

7-
A simple, correct Python packaging build frontend.
7+
A simple, correct Python packaging :std:term:`build frontend <Build Frontend>`.
88

99
build manages ``pyproject.toml``-based builds, invoking
10-
build-backend hooks as appropriate to build a distribution package.
10+
:std:term:`build-backend <Build Backend>` hooks as appropriate to build a
11+
:std:term:`distribution package <Distribution Package>`.
1112
It is a simple build tool and does not perform any dependency management.
1213

1314
.. sphinx_argparse_cli::

src/build/_types.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
from __future__ import annotations
22

33
import os
4+
import sys
45
import typing
56

67

78
__all__ = ['ConfigSettings', 'Distribution', 'StrPath', 'SubprocessRunner']
89

910
ConfigSettings = typing.Mapping[str, typing.Union[str, typing.Sequence[str]]]
1011
Distribution = typing.Literal['sdist', 'wheel', 'editable']
11-
StrPath = typing.Union[str, 'os.PathLike[str]']
12+
13+
if typing.TYPE_CHECKING or sys.version_info > (3, 9):
14+
StrPath = typing.Union[str, os.PathLike[str]]
15+
else:
16+
StrPath = typing.Union[str, os.PathLike]
1217

1318
if typing.TYPE_CHECKING:
1419
from pyproject_hooks import SubprocessRunner

0 commit comments

Comments
 (0)