How to run custom cleanup code after build with setuptools

I have expressed custom clean steps in setup.py, using the “build” front-end, but there is no way to trigger the back-end clean-up through the front-end (i.e. have the build front-end call ./setup clean resp. ./setup clean --all).

See also Proper clean-up hook usable with pyproject-build · pypa/setuptools · Discussion #4121 · GitHub from where I’ve been pointed to here.

While I agree that the back-end should decide/express what clean-up means, shouldn’t the front-end have a clean-up action to be able to trigger it (like sdist or wheel)?

Thanks, Eric