Commit 2549604
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 ae480ff commit 2549604
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 | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
0 commit comments