poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Improve debug logging for "Skipping wheel xxx-7.7.2-cp310-cp310-manylinux_2_35_x86_64.whl as this is not supported by the current environment"

Open alexanderilyin opened this issue 1 year ago • 7 comments

Issue Kind

Change in current behaviour

Description

There is partcad package which depends on cadquery-ocp. Wheels for which are provided by:

  • https://github.com/CadQuery/ocp-build-system

And poetry ignores compatible wheel which has platform specified as manylinux

Give the following configuration:

[tool.poetry.dependencies]
cadquery-ocp = { version = "^7.7.2" }

poetry install will fail: output.txt.

When it's running on:

⬢ [Docker] ❯ python -c "import sys; print(sys.platform)"
linux
⬢ [Docker] ❯ lsb_release -d
Description:    Debian GNU/Linux 11 (bullseye)

According to the following:

  • https://github.com/pypa/manylinux

cadquery_ocp-7.7.2-cp310-cp310-manylinux_2_35_x86_64.whl should be selected but in reality it's not supported by the current environment

Impact

It will allow to use Poetry with packages which are distributed for manylinux platform.

Workarounds

Override sys_platform using markers:

[tool.poetry.dependencies]
python = "^3.10"
partcad = { version = "^0.7.16", markers = "sys_platform == 'manylinux'" }

alexanderilyin avatar Nov 08 '24 05:11 alexanderilyin

Well, it's something else:

Package has cp310-cp310-manylinux_2_35_x86_64 tag but closest tag supported by Poetry is cp310-cp310-manylinux_2_31_x86_64.

Probably next step for me is to figure out what does 35 and 31 mean.

alexanderilyin avatar Nov 08 '24 07:11 alexanderilyin

Okay, it's actually 2_35 vs 2_31 which are glibc versions, and here is what I have:

⬢ [Docker] ❯ ldd --version
ldd (Debian GLIBC 2.31-13+deb11u11) 2.31

alexanderilyin avatar Nov 08 '24 07:11 alexanderilyin

It seems that in my case solution was to move from bullseye to bookworm:

⬢ [Docker] ❯ lsb_release -d
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)
⬢ [Docker] ❯ ldd --version
ldd (Debian GLIBC 2.36-9+deb12u8) 2.36
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

alexanderilyin avatar Nov 08 '24 07:11 alexanderilyin

I'd keep this issue open but repurpose it to improve debug logging in is_supported_by_environment() so It would tell that my glibc is too old.

alexanderilyin avatar Nov 08 '24 07:11 alexanderilyin

I think some kind of fuzzy search or levenshtein distance would allow to filter supported tag and then do some additional parsing / explanation.

alexanderilyin avatar Nov 08 '24 07:11 alexanderilyin

code is here, if you have improvements to the logging please submit a merge request

though I'd hint that if you are getting into "fuzzy search or levenshtein distance" then you are likely over-complicating it

dimbleby avatar Nov 08 '24 12:11 dimbleby

Will do thanks!

alexanderilyin avatar Nov 08 '24 20:11 alexanderilyin

This is not something the core team is planning to work on.

abn avatar Jan 14 '25 21:01 abn

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[bot] avatar Feb 14 '25 00:02 github-actions[bot]