Poetry: Poetry does not install from wheels on macOS Big Sur

Created on 6 Dec 2020  路  2Comments  路  Source: python-poetry/poetry

Issue

When using Poetry on Big Sur, poetry.installation.chooser.Chooser is not recognizing available macOS wheels.
e.g. Poetry uses cryptography-3.0.tar.gz instead of cryptography-3.0-cp27-cp27m-macosx_10_10_x86_64.whl.

This has been fixed in https://github.com/pypa/packaging/pull/319 (v20.5 and above), however it appears that Poetry is using packaging v20.4.
I've tracked it down to https://github.com/python-poetry/poetry-core vendoring in packaging v20.4, as poetry.utils.env.VirtualEnv.get_supported_tags is using ~/.poetry/lib/poetry/_vendor/py3.8/poetry/core/_vendor/packaging/tags.py as the script source on my machine.

I'm happy to put up a PR for this both here and in poetry-core, I just wasn't sure how to proceed with the vendoring there and how it ties back to here.

If there's any clarification I can provide, let me know :)

Bug Triage

Most helpful comment

For a sketchy workarount in the meantime

pip=$(which pip)
pushd $PWD
cd "$(dirname $(which poetry))/../lib/poetry/_vendor/"
cd "py$( python -V | grep -o '[23]\.[0-9]\+')"
cd poetry/core/_vendor
sed -i '' 's/packaging==20.4/packaging==20.5/' vendor.txt
$pip install -t $PWD --upgrade -r vendor.txt
unset pip
popd

All 2 comments

For a sketchy workarount in the meantime

pip=$(which pip)
pushd $PWD
cd "$(dirname $(which poetry))/../lib/poetry/_vendor/"
cd "py$( python -V | grep -o '[23]\.[0-9]\+')"
cd poetry/core/_vendor
sed -i '' 's/packaging==20.4/packaging==20.5/' vendor.txt
$pip install -t $PWD --upgrade -r vendor.txt
unset pip
popd

For a sketchy workarount in the meantime

Feels weird but works (changed mine to install packaging==20.7 since that's latest).
Also calling out that virtualenv still has wheels for pip 20.2.2 packaged with it, I needed to run poetry run pip install -U pip so that pip would install macOS wheels without erroring.

But with those two changes, seems like things are working... so one upstream dependency and then figuring out what all's in Poetry that needs changing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremy886 picture jeremy886  路  3Comments

nikaro picture nikaro  路  3Comments

ghost picture ghost  路  3Comments

sobolevn picture sobolevn  路  3Comments

ulope picture ulope  路  3Comments