Commit 8b84450
committed
Short-circuit get_requires hooks when there are no extra build dependencies
The PEP 517 get_requires_for_build_(wheel|sdist) hooks function by
running the egg_info command with a patched Distribution that raises a
special exception when build dependencies (from setup_requires) are
about to be installed.
This works great at minimizing the overhead of the requires hooks...
except when there are no dynamic build dependencies. In such a
situation, the injected install_build_eggs() shim that raises
SetupRequirementsError is never invoked, thus the entire egg_info
command will execute. This often results in substantial overhead
for modern projects that use [build-system].requires and not
setup_requires.1 parent 6f7b6dd commit 8b84450
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
0 commit comments