Skip to content

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

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

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

Conversation

@jharlow-intel

@jharlow-intel jharlow-intel commented Dec 2, 2026 •

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.

@jharlow-intel jharlow-intel self-assigned this Dec 2, 2026
@jharlow-intel jharlow-intel changed the title build: Include LICENSE.txt in wheels build: Declare LICENSE.txt in license-files Dec 2, 2026
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.
@jharlow-intel
jharlow-intel force-pushed the fix/wheel-license-file branch from b909e1b to 8cf74cf Compare December 2, 2026 16:54
@antonwolfy antonwolfy added this to the 0.7.0 release milestone Dec 3, 2026
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.

Nit: this floor only applies to isolated builds. The pip install lines in .github/workflows/build_pip.yml, build-with-clang.yml, build-with-standard-clang.yml and coverity.yml, and the setup steps in CONTRIBUTING.md and README.md, still install meson-python without a version and then build with --no-build-isolation. In that mode pip doesn't check build-system.requires by default. CI runners start fresh and get the latest release, so they're fine. A developer who follows CONTRIBUTING or README in an existing env with meson-python 0.16 or 0.17 gets no hint about the new minimum, and the build then fails on license-files or ignores it. Could you write "meson-python>=0.18.0" there too, at least in the two docs?

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