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

Implement PEP 753: "Well-known Project URLs in Metadata" #13135

Open
ichard26 opened this issue Dec 29, 2024 · 0 comments
Open

Implement PEP 753: "Well-known Project URLs in Metadata" #13135

ichard26 opened this issue Dec 29, 2024 · 0 comments
Labels
C: list/show 'pip list' or 'pip show' PEP implementation Involves some PEP

Comments

@ichard26
Copy link
Member

A few months ago, PEP 753 was accepted. It is now known as the "Well-known Project URLs in Metadata" standard. We should implement it as pip does consume project URL metadata.

I haven't looked at pip's existing Project-URL or Home-page handling, so it's possible that there is very little or nothing to do on pip's end, but I wanted to file this issue to make sure we take a look at some point. The logic that mirrors PyPI's old homepage Project-URL aliasing probably needs a some tweaking to have it conform to the specification.

if not homepage:
# It's common that there is a "homepage" Project-URL, but Home-page
# remains unset (especially as PEP 621 doesn't surface the field).
#
# This logic was taken from PyPI's codebase.
for url in project_urls:
url_label, url = url.split(",", maxsplit=1)
normalized_label = (
url_label.casefold().replace("-", "").replace("_", "").strip()
)
if normalized_label == "homepage":
homepage = url.strip()
break

cc @woodruffw

@ichard26 ichard26 added C: list/show 'pip list' or 'pip show' PEP implementation Involves some PEP labels Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: list/show 'pip list' or 'pip show' PEP implementation Involves some PEP
Projects
None yet
Development

No branches or pull requests

1 participant