Skip to content

build: Declare LICENSE.txt in license-files - #219

Open
jharlow-intel wants to merge 1 commit into
masterfrom
fix/wheel-license-file
Open

jharlow-intel wants to merge 1 commit into
masterfrom
fix/wheel-license-file

Conversation

@jharlow-intel

Copy link
Copy Markdown
Collaborator

Declare the license file in pyproject.toml, so meson-python copies LICENSE.txt into each wheel's .dist-info/licenses/.

  • Add license-files = ["LICENSE.txt"] to [project].
  • Raise the meson-python floor from 0.16.0 to 0.18.0 in [build-system] and in conda-recipe/meta.yaml. 0.18.0 is the first release that supports license-files.
  • Add a changelog entry.

pyproject-metadata 0.12.1, which meson-python 0.18+ uses to write the core metadata, renders License-Expression: BSD-3-Clause and License-File: LICENSE.txt from the updated pyproject.toml.

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 antonwolfy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pyproject.toml
build-backend = "mesonpy"
requires = [
"meson-python>=0.16.0",
"meson-python>=0.18.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants