Skip to content

Commit 5a17132

Browse files
committed
Docs: reflect removal of direct setup.py invocations
1 parent 893ab4b commit 5a17132

File tree

12 files changed

+29
-326
lines changed

12 files changed

+29
-326
lines changed

docs/html/cli/pip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ when decision is needed.
7777
.. _`2-build-system-interface`:
7878
.. rubric:: Build System Interface
7979

80-
This is now covered in :doc:`../reference/build-system/index`.
80+
This is now covered in :doc:`../reference/build-system`.
8181

8282
.. _`General Options`:
8383

docs/html/cli/pip_install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ This is now covered in :doc:`../topics/local-project-installs`.
255255
.. _`0-build-system-interface`:
256256
.. rubric:: Build System Interface
257257

258-
This is now covered in :doc:`../reference/build-system/index`.
258+
This is now covered in :doc:`../reference/build-system`.
259259

260260
.. _`pip install Options`:
261261

docs/html/cli/pip_wheel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Description
2828
.. _`1-build-system-interface`:
2929
.. rubric:: Build System Interface
3030

31-
This is now covered in :doc:`../reference/build-system/index`.
31+
This is now covered in :doc:`../reference/build-system`.
3232

3333
Differences to ``build``
3434
------------------------

docs/html/reference/build-system/pyproject-toml.md renamed to docs/html/reference/build-system.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
# `pyproject.toml`
1+
(build-interface)=
22

33
```{versionadded} 10.0
44
55
```
66

7+
```{versionchanged} 23.1
8+
The legacy interface where pip could invoke `setup.py install`
9+
in some circumstances was removed,
10+
in favor of the fallback behavior described below.
11+
```
12+
13+
```{versionchanged} 25.3
14+
The legacy interface where pip could invoke `setup.py build_wheel` or
15+
`setup.py develop` in some circumstances was removed,
16+
in favor of the fallback behavior described below..
17+
```
18+
19+
# Build System Interface
20+
21+
When dealing with installable source distributions of a package, pip does not
22+
directly handle the build process for the package. This responsibility is
23+
delegated to "build backends" -- also known as "build systems". This means
24+
that pip needs an interface, to interact with these build backends.
25+
726
Modern Python packages can contain a `pyproject.toml` file, first introduced in
827
{pep}`518` and later expanded in {pep}`517`, {pep}`621` and {pep}`660`.
928
This file contains build system requirements and information, which are used by
@@ -96,16 +115,6 @@ For performing editable installs, pip will use {pep}`660`
96115
`build_wheel_for_editable` hook that has to be provided by the build backend.
97116
The wheels generated using this mechanism are not cached.
98117

99-
```{admonition} Compatibility fallback
100-
If this hook is missing on the build backend _and_ there's a `setup.py` file
101-
in the project, pip will fallback to the legacy setup.py-based editable
102-
installation.
103-
104-
This is considered a stopgap solution until setuptools adds support for
105-
{pep}`660`, at which point this functionality will be removed; following pip's
106-
regular {ref}`deprecation policy <Deprecation Policy>`.
107-
```
108-
109118
### Backend Configuration
110119

111120
Build backends have the ability to accept configuration settings, which can
@@ -125,8 +134,7 @@ files.
125134
## Build output
126135

127136
It is the responsibility of the build backend to ensure that the output is
128-
in the correct encoding, as described in {pep}`517`. This likely involves
129-
dealing with [the same challenges as pip has for legacy builds](build-output).
137+
in the correct encoding, as described in {pep}`517`.
130138

131139
## Fallback Behaviour
132140

@@ -138,7 +146,8 @@ https://setuptools.pypa.io/en/stable/userguide/quickstart.html#basic-use).
138146
```
139147

140148
If a project does not have a `pyproject.toml` file containing a `build-system`
141-
section, it will be assumed to have the following backend settings:
149+
section, and contains a `setup.py` it will be assumed to have the following
150+
backend settings:
142151

143152
```toml
144153
[build-system]

docs/html/reference/build-system/index.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

docs/html/reference/build-system/setup-py.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

docs/html/reference/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interoperability standards that pip utilises/implements.
66
```{toctree}
77
:titlesonly:
88
9-
build-system/index
9+
build-system
1010
requirement-specifiers
1111
requirements-file-format
1212
installation-report

docs/html/reference/requirements-file-format.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ and two {ref}`--find-links <install_--find-links>` locations:
109109

110110
The options which can be applied to individual requirements are:
111111

112-
- {ref}`--global-option <install_--global-option>`
113112
- {ref}`--config-settings <install_--config-settings>`
114113
- `--hash` (for {ref}`Hash-checking mode`)
115114

@@ -150,30 +149,3 @@ You can now store sensitive data (tokens, keys, etc.) in environment variables
150149
and only specify the variable name for your requirements, letting pip lookup
151150
the value at runtime. This approach aligns with the commonly used
152151
[12-factor configuration pattern](https://12factor.net/config).
153-
154-
155-
## Influencing the build system
156-
157-
```{danger}
158-
This disables the use of wheels (cached or otherwise). This could mean that builds will be slower, less deterministic, less reliable and may not behave correctly upon installation.
159-
160-
This mechanism is only preserved for backwards compatibility and should be considered deprecated. A future release of pip may drop these options.
161-
```
162-
163-
The `--global-option` option is used to pass options to `setup.py`.
164-
165-
```{attention}
166-
These options are highly coupled with how pip invokes setuptools using the {doc}`../reference/build-system/setup-py` build system interface. It is not compatible with newer {doc}`../reference/build-system/pyproject-toml` build system interface.
167-
168-
This is will not work with other build-backends or newer setup.cfg-only projects.
169-
```
170-
171-
If you have a declaration like:
172-
173-
FooProject >= 1.2 --global-option="--no-user-cfg"
174-
175-
The above translates roughly into running FooProject's `setup.py` script as:
176-
177-
python setup.py --no-user-cfg install
178-
179-
Note that the only way of giving more than one option to `setup.py` is through multiple `--global-option` options.

0 commit comments

Comments
 (0)