-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] option for cleaning up build artefacts and directories #610
Comments
This is handed by the build backend. Setuptools happens to make those directories ( |
Hmm... then the scope of the problem is "just" larger, right? To solve that correctly we'd need an interface between the build back- and frontend so that the frontend can trigger a cleanup by the backend. |
I don't know if it's worth exposing a hook/param to purge the in-tree build cache. As far as I'm aware no other backend dumps its build cache in the source tree and is something that should be fixed by setuptools. |
xref: pypa/setuptools#1871 |
Very much agreed, your earlier post was the first time it dawned on my that setuptools was the culprit. Thanks for taking the time of reading and answering. The only real usecase I can present was outlined in #455, their presence can cause unexpeted behavior and makes some task a bit more annoying. |
Build creates several files and directories in the project dirs, some of them intermediate. Manual cleanup e.g. with something like
rm -rf src/*.egg-info/ ./dist/ ./build/
can get tedious, because the command is hard to remember and because what actually gets created by build might be subject to change. Can we get apyproject-build --clean
and--clean-all
option? The former would leave the resulting wheels and/or source distributions, while the latter removes everything including thedist
directory.Could be combined with #455 to clean before building, when are provided like so:
pyproject-build --clean-all --wheel
."clear" instead of "clean" might be an option name to consider, as e.g. venv uses it in that context and consistency is cozy and nice.
The text was updated successfully, but these errors were encountered: