Skip to content

License not SPDX-compliant #253

Description

@btschwertfeger

The project declares the following license:

license = {"text" = "Apache 2.0"}

which is not SPDX-compliant (https://spdx.org/licenses/; Apache-2.0 would be the correct value). PEP 639-aware tooling that more and more relies on SPDX-compliant licenses in the project metadata stuggles with this particular package, since the license can't be matched against the defined set of SPDX licenses.

Additionally, the license classifier is deprecated (https://peps.python.org/pep-0639/#deprecate-license-classifiers):

"License :: OSI Approved :: Apache Software License",

So I propose the following diff to sanitize the project metadata:

diff --git a/pyproject.toml b/pyproject.toml
index e135023..f17dd5e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -10,11 +10,10 @@ authors = [
 ]
 readme = "README.rst"
 requires-python = ">=3.2"
-license = {"text" = "Apache 2.0"}
+license = "Apache-2.0"
 classifiers = [
     "Development Status :: 5 - Production/Stable",
     "Intended Audience :: Developers",
-    "License :: OSI Approved :: Apache Software License",
     "Natural Language :: English",
     "Programming Language :: Python",
     "Programming Language :: Python :: 3",

After applying this change, the metadata looks like:

❯ uv build -q .
❯ unzip -qo dist/sortedcontainers-2.4.0-py3-none-any.whl
❯ grep License sortedcontainers-2.4.0.dist-info/METADATA
License-Expression: Apache-2.0
License-File: LICENSE
Sorted Containers License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

I'm happy to provide a PR after approval!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions