Skip to content
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

Python version not respected on macOS #72

Open
alexdewar opened this issue Apr 19, 2024 · 2 comments
Open

Python version not respected on macOS #72

alexdewar opened this issue Apr 19, 2024 · 2 comments

Comments

@alexdewar
Copy link

I'm currently using v2.3.0 on my repo without issue. We run tests on Windows, Linux and macOS using Python 3.11.

However, if I upgrade to v3.0.0, the macOS runner seems to try to use Python 3.12, even though I'm using https://github.com/actions/setup-python/tree/v5/ to set the version to 3.11. Any ideas?

@hxii
Copy link

hxii commented Jun 25, 2024

Seems like this is caused by the jump from using pip to using pipx in order to install poetry.
Perhaps an interim solution could be to replace

pipx install poetry

with

pipx install poetry --python $(python --version)

@j-adamczyk
Copy link

Bump, since this is very problematic, and fix is incredibly simple. Note that just $(python --version) will not work, since pipx requires specific format, e.g. pipx install poetry --python python3.9 (note python3.9 format). Furthermore, assuming that default Python should be used is not ideal.

As a quickfix, we replaced this action with (we use Python versions matrix for testing):

pipx install poetry --python python${{ matrix.python-version }}

The most flexible solution probably is having an optional argument with Python version to select.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants