Method to declare dynamic dependencies
One key feature that scikit-build will need to rely on is declaring dynamic build dependencies. Right now, we suggest a workaround. That (more or less, with a minimum version requirement from config) will be integrated into scikit-build-core's PEP 517 mode and setuptools plugin, and hopefully extensionlib too. (Started here, actually - no actual backends yet, but the shared code is here.) There needs to be some mechanism (like a PEP 517 hook) for each extension to dynamically declare the dependencies it needs to build.
It could be as simple as requiring get_requires_for_build_wheel for an extension-aware builder to call all extension's get_requires_for_build_wheel (or a unique method name, like get_requires_for_extension) and merge the results.
Mostly posting so we can start thinking about it and working on a general design idea.
This needs to be coupled with conditional execution so not running a hook also prevents installing the required dependencies.