Skip to content

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

Closed
@hroncok

Description

@hroncok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions