Skip to content

Poetry doesn't use musllinux binary wheel #5225

Closed

Description

@sherbang
  • 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.

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Feb 22, 2022
  2. ashleysommer commented on Mar 22, 2022

    @ashleysommer

    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.

  3. insertjokehere commented on Apr 18, 2022

    @insertjokehere

    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

  4. abn commented on May 17, 2022

    @abn
    Member

    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.

  5. added this to the 1.2 milestone on May 17, 2022
  6. added
    area/coreRelated to the poetry-core library
    and removed
    status/triageThis issue needs to be triaged
    on May 17, 2022
  7. sherbang commented on Aug 18, 2022

    @sherbang
    Author

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

  8. github-actions commented on Mar 1, 2024

    @github-actions

    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.

  9. locked as resolved and limited conversation to collaborators on Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreRelated to the poetry-core librarykind/bugSomething isn't working as expectedstatus/waiting-on-coreRequires changes to poetry-core first

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions