This is a basic wrapper around the GHA provided actions/setup-python
that:
- avoids the issue with requiring
sudo
and having/Users/runner/hostedtoolcache
on the self hosted runner. - Add support for Windows/ARM64 until it is fixed upstream.
- If
is-self-hosted: false
then this falls back toactions/setup-python
at v5.0.0. - If
python-version
is provided, that takes precedence over any existing.python-version
files - If running on Windows/arm64, uses a hack hardcoded for 3.11.
- If you need to point to a different
.python-version
file, pass the path relative to the current working directory to thepython-version-file
parameter.