Cache clean command
One follow-up that I think I could take on here is to add a utility command around this the cache directory – it would be nice to have something like
cibuildwheel cache clean(similar touv cache clean) orcibuildwheel cache purge(similar topip cache purge) – if y'all agree to this, of course. Currently,emsdkinstalled through takes 1.52 GiB on my machine and thepyodide venvis another 200 MiB, and as these are buried within theplatformdirscache location, I have to go there and manually delete these files. It doesn't bother me too much: while cibuildwheel can be executed locally, the "ci" in the name does mean that not everyone will run into this locally. :) Would you be open to this idea?P.S. It would be pretty useful if
platformdirswere to have a cache-clear command of its own, too, but I won't open an issue in their tracker just yet :)
Originally posted by @agriyakhetarpal in https://github.com/pypa/cibuildwheel/issues/2002#issuecomment-2881739071
I think this is a nice idea. I wouldn't say it needs to be part of platformdirs, it's more on the application itself to manage its storage dirs.
Regarding command line option, cibuildwheel cache clean would be tricky because cache would be interpreted as a project dir. We already have --print-build-identifiers as a subcommand, I think --clean-cache or similar would work.
I wouldn't say it needs to be part of
platformdirs, it's more on the application itself to manage its storage dirs.
Yes, platformdirs is already minimal, serves a specific purpose, and I don't think they wouldn't like to change that either :)
Regarding command line option,
cibuildwheel cache cleanwould be tricky becausecachewould be interpreted as a project dir. We already have--print-build-identifiersas a subcommand, I think--clean-cacheor similar would work.
Sounds good to me!