Repository navigation
Include license file in Python wheel metadata - #12280
Conversation
|
I will review once #12219 is merged. |
|
Thanks. #12219 has now landed, so I updated this branch on top of the scikit-build-core backend and adjusted the license metadata fix accordingly. The previous CI failures were from two metadata validation errors in the new backend:
The follow-up now stages the repository-level |
|
Pushed a small follow-up for the system-install CI failure. The failing job runs Validation:
|
Fixes #12256.
This updates the Python package metadata to use the PEP 639 SPDX license expression and declare the top-level Apache-2.0 license file via
license-files.The current custom Hatchling build backend now copies the repository-level
LICENSEinto the temporary wheel/sdist workspace before delegating to Hatchling. The generated stub package path also copies the same file into the Python package build context and includes it in the stub wheel/sdist target.I also checked this against the scikit-build-core backend shape from #12219: scikit-build-core rejects
license-fileswhenproject.licenseis still the old{ text = ... }table, but accepts the SPDX string form used here and emitsLicense-ExpressionplusLicense-Filemetadata.Validation:
/opt/homebrew/bin/python3.12 -m py_compile ops/script/pypi_variants.py python-package/packager/pep517.pygit diff --checkLicense-Expression: Apache-2.0,License-File: LICENSE, and.dist-info/licenses/LICENSEin the wheel.