sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.41k stars 2.09k forks source link

Missing `License-File` in package metadata #12713

Open mtelka opened 1 month ago

mtelka commented 1 month ago

Describe the bug

Packages like sphinxcontrib_applehelp are delivering their license text in non-standard and unexpected files (like LICENCE.rst). It would be great if location of the license is added to the package metadata, namely License-File (see PEP-639).

How to Reproduce

Download the sphinxcontrib_applehelp-2.0.0.tar.gz sdist from PyPI and unpack it. Look into the sphinxcontrib_applehelp-2.0.0/PKG-INFO file.

Environment Information

N/A

Sphinx extensions

No response

Additional context

No response

AA-Turner commented 1 month ago

non-standard and unexpected files (like LICENCE.rst)

PEP 639 (draft) and Setuptools both suggest a file of the form 'LICEN[CS]E*', which this matches. (Setuptools goes further by looking for ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*'].

I am happy to accept a PR, though.

A

mtelka commented 1 month ago

Yes, the LICENCE.rst filename seems to be okay for setuptools but it does not look so for flit-core. As a consequence the sphinxcontrib-applehelp 2.0.0 wheel at PyPI is missing any license file, while the wheel for sphinxcontrib-applehelp 1.0.8 properly includes the LICENSE file.

Re PR: I'm very sorry, but I cannot create one because I've no idea how to specify something like setuptools' license_files = LICENCE.rst for flit-core.