Open juftin opened 3 hours ago
Here is an example repo to reproduce this: https://github.com/juftin/setup-python-example
and the failing workflow: https://github.com/juftin/setup-python-example/actions/runs/11471145881/job/31921582259
I was able to confirm that the following resolved the issue - but I'm still not clear why the behavior changed ~ a week ago
name: test
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
id: python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python Package
run: pipx install .
env:
PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }}
Description:
I'm not sure if this is an issue with actions/setup-python,
pipx
, or the runners themselves - but the behavior for this changed for me between 2024-10-15 and 2024-10-16 (if you think this should be reported elsewhere please let me know)In the below workflow, the
setup-python-example
Python package requires Python >= 3.11Before 2024-10-16 the example package was installed using Python 3.12, but after it uses Python 3.10 and the workflow fails.
Action version:
v5
Platform:
Runner type:
Tools version:
3.12
Repro steps:
1) Use
ubuntu-latest
runner 2) Runactions/setup-python@v5
with version3.12
3) Install a package the requires Python >= 3.11The action will fail because
pipx
is trying to use Python 3.10.Expected behavior:
I expect
pipx
to use whatever version is setup withactions/setup-python
Actual behavior:
I believe
pipx
is using the runner's default Python version