From 0e0dcc7acc3cfa83157d7b810ebe6c4e759723bd Mon Sep 17 00:00:00 2001 From: sap1110 <238814652+sap1110@users.noreply.github.com> Date: Mon, 17 Aug 2026 13:58:04 +0530 Subject: [PATCH] Declare the license as an SPDX expression instead of a file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit license = {file = "LICENSE"} makes the backend inline the whole license text into the METADATA License field, so the built wheel carries a 30-line License field and PyPI renders the full BSD text where the short name belongs. Switching to the PEP 639 form emits License-Expression: BSD-3-Clause instead. The LICENSE file is still shipped, at dist-info/licenses/LICENSE, via license-files. The License :: OSI Approved :: BSD License classifier goes with it, since PEP 639 deprecates license classifiers once an expression is declared, and hatchling is floored at 1.27, the first release that understands these fields. 🤖🍆 Prepared with the help of an AI coding agent, marked as the contributing guide asks agents to do. Reviewed and tested by me. --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a25d94b6..48ae1300 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,13 @@ [build-system] -requires = ["hatchling >=1.5"] +requires = ["hatchling >=1.27"] build-backend = "hatchling.build" [project] name = "traitlets" authors = [{name = "IPython Development Team", email = "ipython-dev@python.org"}] description = "Traitlets Python configuration system" -license = {file = "LICENSE"} +license = "BSD-3-Clause" +license-files = ["LICENSE"] readme = "README.md" keywords = ["Interactive", "Interpreter", "Shell", "Web"] classifiers = [ @@ -15,7 +16,6 @@ classifiers = [ "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", - "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python", "Typing :: Typed",