Unable to build only cext backend with pep517 builders
The root issue is the [build_system] requires array has cffi as an unconditional build-time dependency. Even if you pass --config-setting='--global-option=--no-cffi-backend' to python -m build it'll fail the build if cffi isn't present. The setup.py entry point does not enforce this requirement if you disable building the cffi backend.
[build-system] doesn't have optional build dependencies: only requires. So our only choices are to list cffi in requires or omit it completely. If we omit it completely, build frontends won't install that dependency unless explicitly told to and the cffi backend will rarely get built. Not great behavior. Hence why we list cffi in requires.
May I ask why you would only want to build the cext backend? Why not just install the listed build dependencies (including cffi) and build both backends? If you are packaging, you could delete the cffi backend files post build.
It has to do with us only shipping cffi 1.x on old Pythons.
We could delete the files post-build, however, anyone who's able to do that while packaging could also apply a patch to the pyproject.toml to change whatever dependencies they needed. So if there isn't a way to do optional build requirements I am OK if you close this as wontfix and we'd just patch what we needed to in the cases where it's required.