Commit 27b15e3
committed
Stop installing setuptools and wheel
Currently the buildpack performs a system site-packages install of not
only pip, but also setuptools and wheel. This has historically been
necessary for pip to be able to build source distributions (sdists) for
packages that don't ship with compatible wheels.
However:
- Thanks to PEP 518, packages can now (and many already do) specify an
explicit build backend using `[build-system]` in their
`pyproject.toml`. The dependencies specified in that config (such as
setuptools and wheel) will be installed by pip into an isolated and
ephemeral build environment as part of the source distribution build
process. Such packages therefore don't need/use globally installed
setuptools/wheel versions.
- As of pip v22.1, pip will now default to the isolated build environment
mode (along with a fallback legacy setuptools build backend), if the
setuptools package isn't installed globally. This means that packages
that haven't yet migrated to a PEP 518 `pyproject.toml` build backend
config can still build even if setuptools isn't installed globally.
There are a small number of rarely used packages in the wild that
aren't compatible with build isolation mode, however, these typically
require more build dependencies than just setuptools, which means they
wouldn't have worked with this buildpack anyway.
As such, it's no longer necessary for us to install setuptools and wheel
globally. This matches the behaviour of the `venv` and `ensurepip` modules
in Python 3.12+, where setuptools and wheel installation has also been
removed. And it also matches the default behaviour of Poetry too, whose
`install --sync` command removes any implicitly installed packages in the
current environment (other than pip).
See:
https://peps.python.org/pep-0518/
https://pip.pypa.io/en/stable/reference/build-system/
https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation
pypa/pip#10717
python/cpython#101039
pypa/get-pip#218
astral-sh/uv#2252
GUS-W-16437776.1 parent 1ee3732 commit 27b15e3
File tree
10 files changed
+52
-162
lines changed- requirements
- src
- layers
- tests
10 files changed
+52
-162
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | | - | |
| 86 | + | |
88 | 87 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
| |||
71 | 64 | | |
72 | 65 | | |
73 | 66 | | |
74 | | - | |
75 | 67 | | |
76 | | - | |
| 68 | + | |
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
| |||
117 | 109 | | |
118 | 110 | | |
119 | 111 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 112 | + | |
123 | 113 | | |
124 | 114 | | |
125 | 115 | | |
| |||
140 | 130 | | |
141 | 131 | | |
142 | 132 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 133 | + | |
146 | 134 | | |
147 | 135 | | |
148 | 136 | | |
| |||
170 | 158 | | |
171 | 159 | | |
172 | 160 | | |
173 | | - | |
| 161 | + | |
174 | 162 | | |
175 | 163 | | |
176 | 164 | | |
| |||
189 | 177 | | |
190 | 178 | | |
191 | 179 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 180 | + | |
198 | 181 | | |
199 | 182 | | |
200 | 183 | | |
201 | 184 | | |
202 | 185 | | |
203 | 186 | | |
204 | 187 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 188 | + | |
211 | 189 | | |
212 | 190 | | |
213 | 191 | | |
| |||
236 | 214 | | |
237 | 215 | | |
238 | 216 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 217 | | |
252 | 218 | | |
253 | 219 | | |
| |||
423 | 389 | | |
424 | 390 | | |
425 | 391 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 392 | + | |
431 | 393 | | |
432 | 394 | | |
433 | 395 | | |
| |||
462 | 424 | | |
463 | 425 | | |
464 | 426 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
| 427 | + | |
470 | 428 | | |
471 | 429 | | |
472 | 430 | | |
| |||
475 | 433 | | |
476 | 434 | | |
477 | 435 | | |
478 | | - | |
479 | | - | |
480 | 436 | | |
481 | 437 | | |
482 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
73 | 66 | | |
74 | 67 | | |
75 | 68 | | |
76 | 69 | | |
77 | 70 | | |
78 | 71 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 72 | + | |
85 | 73 | | |
86 | 74 | | |
87 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 6 | + | |
| 7 | + | |
34 | 8 | | |
35 | 9 | | |
36 | 10 | | |
| |||
0 commit comments