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

Poetry doesn't use musllinux binary wheel #5225

Closed
3 tasks done
sherbang opened this issue Feb 22, 2022 · 5 comments
Closed
3 tasks done

Poetry doesn't use musllinux binary wheel #5225

sherbang opened this issue Feb 22, 2022 · 5 comments
Labels
area/core Related to the poetry-core library kind/bug Something isn't working as expected status/waiting-on-core Requires changes to poetry-core first
Milestone

Comments

@sherbang
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: python:3.10-alpine docker container
  • Poetry version: 1.1.13 and 1.2.0a2
  • Link of a Gist with the contents of your pyproject.toml file: n/a

Issue

Poetry isn't finding musllinux binary wheel for the cryptography package that pip finds. Instead, it compiles from source on Alpine. Pip finds the binary package and installs cryptography successfully.

This gist contains scripts to reproduce the issue.

@sherbang sherbang added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 22, 2022
@ashleysommer
Copy link

I've got the same problem, with the orjson package.

orjson now (since v3.6.7) publishes a musllinux binary wheel compatible with Apline Linux.
Installing with pip3 install "orjson>=3.6.7" works fine (pip downloads and installs the musllinux bdist wheel), but installing with Poetry instead ignores the bdist and tries to build the package from source.

@insertjokehere
Copy link

I'm having the same issue with the grpcio package - there are musl wheels available that pip finds but poetry doesn't - adds about 30 minutes to CI runs

@abn
Copy link
Member

abn commented May 17, 2022

In theory, the implementation of PEP 656 in packaging and Poetry's update of the package in #4749 should have fixed the issue. However, this issue can still persist due to poetry-core's vendored packaging version being older than what poetry uses. The changes in python-poetry/poetry-core#336 should fix this issue.

You can test this using the following snippet.

podman run --rm -i --entrypoint sh docker.io/python:3.10-alpine <<EOF
set -xe
apk add gcc libc-dev make libffi-dev curl git
python -m pip install -q git+https://github.com/python-poetry/poetry.git@master
python -m pip install -q git+https://github.com/python-poetry/poetry-core.git@master
poetry new foobar
cd foobar
poetry add cryptography
EOF

However, we seem to have a broader issue of Poetry re-using core's vendored packages and thereby being tied to the version there cusing some unexpected issues. While outside the scope of this particular issue, we should handle it in another issue.

@abn abn added this to the 1.2 milestone May 17, 2022
@abn abn added status/waiting-on-core Requires changes to poetry-core first area/core Related to the poetry-core library and removed status/triage This issue needs to be triaged status/waiting-on-core Requires changes to poetry-core first labels May 17, 2022
@sherbang
Copy link
Author

Closed as it's working for me in poetry 1.2.0b1 and later

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/core Related to the poetry-core library kind/bug Something isn't working as expected status/waiting-on-core Requires changes to poetry-core first
Projects
None yet
Development

No branches or pull requests

4 participants