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

data_dir heuristics #171

Open
davidszotten opened this issue Mar 13, 2023 · 0 comments
Open

data_dir heuristics #171

davidszotten opened this issue Mar 13, 2023 · 0 comments
Labels
component: destinations Related to WheelDestination and friends type: discussion Discussion of general questions, ideas, design, etc.

Comments

@davidszotten
Copy link

Hi,

i came here via poetry which has started depending on this lib as of the recently released 1.4

I'm not sure if this is a bug, or if pip is too lenient, but thought worth asking. I have a (malformed?) wheel where the data-dir uses different normalization to the package, causing this library to fail to find it.

pip (afict) uses a heuristic based on the name ending https://github.com/pypa/pip/blob/main/src/pip/_internal/operations/install/wheel.py#L537 (which looks similar to what was introduced here ed47a74 for finding the dist-info folder.

maybe

if posixpath.commonprefix([data_dir, path]) != data_dir:
could be replaced by a similar heuristic instead of the full name comparison?

i'm not very familiar with python packaging so i may be missing lots of context. if this is a reasonable suggestion however, i'm happy to try to make a patch

@Secrus Secrus added type: discussion Discussion of general questions, ideas, design, etc. component: destinations Related to WheelDestination and friends labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: destinations Related to WheelDestination and friends type: discussion Discussion of general questions, ideas, design, etc.
Projects
None yet
Development

No branches or pull requests

2 participants