setup-python
setup-python copied to clipboard
feat: add optional preclean and postclean options
Description:
- Add preclean and postclean optional inputs to be able to remove existing package installations if boolean options are true ==> For preclean it may be executed before installing some, if preclean is true and pip-version or/and pip-install install some packages ==> For postclean it's executed during the post in your workflow, implemented just after the existing cache step done in post
Related issue:
- On private runners, setup-python installation is not cleaned between runs, so if a user install a package it can break some workflows execution because the PATH containing python binaries is a the beginning of the path (in our case a keyring package installation breaks execution because it mask a keyring installed in ~/.local/bin located later in the PATH, installed with a command like
uv tool install keyring --with keyrings.google-artifactregistry-auth)
Check list:
- [x] Mark if documentation changes are required.
- [x] Mark if tests were added or updated to cover the changes.