Skip to content

Commit 9bee3f4

Browse files
authored
Merge branch 'main' into hint-on-resolution-impossible-when-no-packages-are-available
2 parents 504d1ed + 2a2960d commit 9bee3f4

File tree

93 files changed

+1409
-2272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1409
-2272
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_freeze.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ Description
2323

2424
.. pip-command-description:: freeze
2525

26+
.. note::
27+
By default, ``pip freeze`` omits bootstrap packaging tools so the output
28+
focuses on your project’s dependencies. On Python **3.11 and earlier**
29+
this excludes ``pip``, ``setuptools``, ``wheel`` and ``distribute``; on
30+
Python **3.12 and later** only ``pip`` is excluded. Use ``--all`` to
31+
include those packages when you need a complete environment snapshot.
32+
``pip freeze`` reports what is installed; it does **not** compute a
33+
lockfile or a solver result.
34+
2635

2736
Options
2837
=======

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

0 commit comments

Comments
 (0)