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

Possible contradiction in rules for naming source distribution files containing -_. #1750

Open
1 task done
priolacci opened this issue Dec 16, 2024 · 1 comment
Open
1 task done

Comments

@priolacci
Copy link

priolacci commented Dec 16, 2024

Issue Description

The specification page for source distributions states the following:

The file name of a sdist was standardised in PEP 625. The file name must be in the form {name}-{version}.tar.gz, where {name} is normalised according to the same rules as for binary distributions (see Binary distribution format), and {version} is the canonicalized form of the project version (see Version specifiers).

The name and version components of the filename MUST match the values stored in the metadata contained in the file.

The rules for binary distributions states that -_. should be replaced by _ in distribution names.

But the naming convention for core metadatas requires the package maintainer to follow this normalization, which states -_. should be replaced by -.

Hence, for a package named for instance "my-package" v0.1, the metadata specification would require the "Name" attribute in the metadata to be my-package, while the specification for source distribution files requires the name of the file to be my_package-0.1.tar.gz, making it impossible to follow this part of the source distribution filename specification: "The name and version components of the filename MUST match the values stored in the metadata contained in the file."

Code of Conduct

  • I am aware that participants in this repository must follow the PSF Code of Conduct.
@webknjaz
Copy link
Member

I suppose "match" != "be equal exactly"? It might mean "correspond" in this context.

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

3 participants
@webknjaz @priolacci and others