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

About normalization of *.dist-info #972

Closed
LecrisUT opened this issue Jan 15, 2025 · 3 comments
Closed

About normalization of *.dist-info #972

LecrisUT opened this issue Jan 15, 2025 · 3 comments

Comments

@LecrisUT
Copy link
Collaborator

This issue came up recently where setuptools and hatchling/scikit-build-core either normalize or do not normalize the project name when creating the *.dist-info folder. My understanding is that this should not be an issue because tools like importlib.metadata should also do such normalization, but apparently pkg_resources.requires fails at that. The complication is also that that function is deprecated (and removed) in more recent setuptools so I cannot check it locally what is the status there.

But in short, is the normalization backed by a PEP, and if so why is it not enforced on setuptools?

Reference:

@henryiii
Copy link
Collaborator

This is a new-ish requirement in the standard: https://packaging.python.org/en/latest/specifications/binary-distribution-format (though I think it's not very clearly mandated there, though that was the intent). The bug is in pkg_resources pypa/setuptools#3146, but that's deprecated so not sure if it's going to be fixed.

@LecrisUT
Copy link
Collaborator Author

Thanks for the reference. I guess it's an issue on setuptools that they should align to it. But interesting that the upstream bug in pkg_resources says that jaraco.functools is failing, but the version in EPEL9 is reported to actually pass 🤷. My thought right now is to make a symlink to satisfy the issue in that bugzilla, but I don't know if it can cause other unforeseen issues. Hopefully though this is a user issue that can be solved by using importlib.metadata.

@henryiii
Copy link
Collaborator

Setuptools should align with pypa/setuptools#4766.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants