Skip to content

MAINT: Fix deprecated license specification in pyproject.toml #29367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

koyuki7w
Copy link
Contributor

Now that PEP 639 is accepted, and meson-python suppopts it since version 0.18.0, the license specification should follow the PEP.

Now that PEP 639 is accepted, and meson-python suppopts it since version 0.18.0, the license specification should follow the PEP.
Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

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

Looks like the usage of the classifiers for this purpose is indeed deprecated in the PEP: https://peps.python.org/pep-0639/#deprecate-license-classifiers

This looks pretty decent to me--may want Ralf to quickly look it over, given familiarity with the metadata/PEP stuff.

"Cython>=3.0.6", # keep in sync with version check in meson.build
]

[project]
name = "numpy"
version = "2.4.0.dev0"
# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88)
license = {file = "LICENSE.txt"}
license = "BSD-3-Clause"
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity/healthy skepticism, I naturally tried:

--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,7 +8,7 @@ requires = [
 [project]
 name = "numpy"
 version = "2.4.0.dev0"
-license = "BSD-3-Clause"
+license = "BSD-20-Clause"

and I do indeed see an error when I do an isolated local build:

meson-python: error: Unknown license: 'bsd-20-clause'

@rgommers
Copy link
Member

Thanks @koyuki7w. The main reason I hadn't done this yet is that it needs investigating if there's an issue with installing wheels with older versions of pip after this change. Use of PEP 639 increases the Core Metadata version to 2.4. I recently briefly looked at this and found that support was added in pip 25.0, but installing wheels with 24.3.1 worked. Would you be able to check with older versions? E.g. build a numpy wheel, then in a virtualenv do pip install pip==23.1 and then try to install the wheel. It'd be good to know if there's a change in the oldest pip version we support.

@rgommers
Copy link
Member

I had a branch here with more extensive changes already: main...rgommers:numpy:license-pep639 (not complete yet).

@ngoldbaum
Copy link
Member

This is the discussion about whether to include licenses of vendored code in the license expression is also probably relevant too: https://discuss.python.org/t/split-from-pep-639-expressing-project-vs-distribution-licenses-post-pep-639-mod-titled/90314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy