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

[FR] Support License-File root license directory (PEP 639) #3596

Open
1 task done
hroncok opened this issue Sep 19, 2022 · 3 comments · May be fixed by #4728
Open
1 task done

[FR] Support License-File root license directory (PEP 639) #3596

hroncok opened this issue Sep 19, 2022 · 3 comments · May be fixed by #4728
Labels
enhancement help wanted Needs Triage Issues that need to be evaluated for severity and status.

Comments

@hroncok
Copy link
Contributor

hroncok commented Sep 19, 2022

What's the problem this feature will solve?

The License-File core metadata tag definition in https://peps.python.org/pep-0639/ was updated. Specifically:

Root License Directory (Short: License Directory)
The directory under which license files are stored in a project/distribution
and the root directory that their paths, as recorded under the License-File
core metadata fields, are relative to. Defined here to be the project root
directory for source trees and source distributions, and a subdirectory
named licenses of the directory containing the core metadata
(i.e., the .dist-info/licenses directory) for built distributions and
installed projects.

And:

As specified by this PEP, [License-File] value is also that file’s path
relative to the root license directory in [...] installed projects [...]

Translated to human language, when the License-File looks like this:

License-File: LICENSE

The file should be located in ...dist-info/licenses/LICENSE. Currently, it is located in ...dist-info/LICENSE directly, based on a previous iteration of this PEP (which is til a draft).

Describe the solution you'd like

When including license files in dist-info, move them to the licenses directory.

Alternative Solutions

An alternate solution is that a tool that reads the License-File core metadata tag should look for the files in both locations.

Additional context

hatchling already follows this and includes the license files in the licenses directory.

Thank you ❤️

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@hroncok hroncok added enhancement Needs Triage Issues that need to be evaluated for severity and status. labels Sep 19, 2022
@abravalheri
Copy link
Contributor

Thank you for the ticket @hroncok.

My doubt here is if we should wait until PEP 639 is finalised instead of risking implementing it again and having to change later.

This issue also might require coordination with the wheel package.

@befeleme
Copy link
Contributor

befeleme commented Sep 3, 2024

My doubt here is if we should wait until PEP 639 is finalised instead of risking implementing it again and having to change later.

PEP 639 has been provisionally accepted (with one of the conditions being implementation in at least two build backends 🥺), so this issue now describes the solution agreed upon.

@abravalheri
Copy link
Contributor

Thank you very much @befeleme.

If any member of the community is interested in giving it a go, PRs are very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants