-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow running Poetry with a non-default Python version #8
Comments
... because Poetry crashes on 3.10. (Gr1N/setup-poetry#8)
... because Poetry crashes on 3.10. (Gr1N/setup-poetry#8)
This feature will be also useful for testing old Python versions. For now, the following hack seems to work: jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- id: python-path
run: echo "::set-output name=path::$(command -v python)"
- uses: Gr1N/setup-poetry@v4
- id: poetry-path
run: echo "::set-output name=path::$(command -v poetry)"
- uses: actions/setup-python@v2
with:
python-version: 3.10-dev
- run: sed -i '1i#!${{ steps.python-path.outputs.path }}' '${{ steps.poetry-path.outputs.path }}'
- run: poetry env use 3.10
- run: poetry run python --version
- run: poetry install |
For now, I'm doing some thing similar:
This way, See my workflow for an example. In my case I just need tox and poetry anyway, and not all of the other dev dependencies listed in my pyproject.toml. |
Hi, sorry for the delay with the answer. |
I'm trying to run my tests with Python 3.10. However, Poetry doesn't support 3.10 yet and crashes.
Locally, I can run Poetry using another Python version than the one used for the virtualenv set up by Poetry. Is the same possible somehow with setupoetry?
The text was updated successfully, but these errors were encountered: