Repository navigation
build: Declare LICENSE.txt in license-files - #219
jharlow-intel wants to merge 1 commit into
Conversation
meson-python copies license-files entries into a wheel's .dist-info/licenses. Raise the meson-python floor to 0.18.0, the first release that supports license-files.
antonwolfy
left a comment
There was a problem hiding this comment.
Approving. I checked the Linux Wheels Python 3.15 wheel from this PR's CI: it contains mkl_random-1.7.0.dev0.dist-info/licenses/LICENSE.txt, and its METADATA has Metadata-Version: 2.4, License-Expression: BSD-3-Clause and License-File: LICENSE.txt. 0.18.0 is the right floor: meson-python 0.17.1 only copies the file of a license = {file = ...} table, and 0.18.0 is the first release that writes license-files into the wheel.
The failing internal CI check is not caused by this change: its two failed cells (windows-py315-wheel test and windows-py311-conda test) could not reach the Docker daemon on the Windows agent and never ran the tests. A rerun should pass once the agent is fixed.
One optional nit inline.
| build-backend = "mesonpy" | ||
| requires = [ | ||
| "meson-python>=0.16.0", | ||
| "meson-python>=0.18.0", |
There was a problem hiding this comment.
Optional nit: the README's build-from-source path that reuses an existing mkl/numpy install (README.md#L153) runs pip install meson-python cmake ninja "cython>=3.1.0" numpy mkl-devel and then python -m pip install --no-build-isolation --no-deps .. In an environment that already has meson-python 0.17, the first command leaves it as is, and with --no-build-isolation pip does not check [build-system] requires, so the build succeeds but the wheel has no dist-info/licenses/LICENSE.txt. Writing "meson-python>=0.18.0" there, as that line already does for "cython>=3.1.0", would keep this path in line with the new floor.
Declare the license file in
pyproject.toml, so meson-python copiesLICENSE.txtinto each wheel's.dist-info/licenses/.license-files = ["LICENSE.txt"]to[project].meson-pythonfloor from 0.16.0 to 0.18.0 in[build-system]and inconda-recipe/meta.yaml. 0.18.0 is the first release that supportslicense-files.pyproject-metadata0.12.1, which meson-python 0.18+ uses to write the core metadata, rendersLicense-Expression: BSD-3-ClauseandLicense-File: LICENSE.txtfrom the updatedpyproject.toml.