Skip to content

pyproject.toml: use non-deprecated license specification #1687

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = [
"setuptools>=47.2.0",
"setuptools>=77.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid this? For example, Debian stable only has 66.1.1 (77.0 was released in March 2025).

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea how. On 2026-Feb-18 we won't be able to prepare builds with the setuptools version released then (see deprecation warning above). The migration phase is pretty short. Maybe we should postpone merging this PR until beginning of 2026?

There's also discussion here pypa/setuptools#4903, including comments pointing to distro versions of setuptools pypa/setuptools#4903 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

Lets postpone this a bit and see how this evolves.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, I've converted this into a draft, so it won't be merged yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would switching build systems be an option?

Copy link
Member

Choose a reason for hiding this comment

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

Are there alternatives that are widely available in binary distributions?

Copy link
Contributor

@threexc threexc Jul 16, 2025

Choose a reason for hiding this comment

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

I am fond of hatch/hatchling, which it seems is available at least for Debian 12 and Fedora 42, although the versions differ significantly:

Debian 12:

(labgrid-venv) tgamblin@ecogrid:~/labgrid$ apt info python3-hatchling
Package: python3-hatchling
Version: 1.12.2-1
Priority: optional
Section: python
Source: hatchling
Maintainer: Debian Python Team <[email protected]>
Installed-Size: 401 kB
Depends: python3-importlib-metadata | python3 (>> 3.8), python3-packaging, python3-pathspec (>= 0.10), python3-pluggy, python3-tomli | python3 (>> 3.11), python3:any
Homepage: https://hatch.pypa.io/
Download-Size: 53.6 kB
APT-Sources: http://deb.debian.org/debian bookworm/main amd64 Packages
Description: Python package build backend used by Hatch
 This is the extensible, standards compliant build backend used by Hatch.
 .
 It may be required to build a Python module from source.

Fedora 42:

tgamblin@megalith ~ $ dnf info python3-hatchling
Updating and loading repositories:
Repositories loaded.
Available packages
Name           : python3-hatchling
Epoch          : 0
Version        : 1.27.0
Release        : 2.fc42
Architecture   : noarch
Download size  : 220.8 KiB
Installed size : 604.2 KiB
Source         : python-hatchling-1.27.0-2.fc42.src.rpm
Repository     : fedora
Summary        : The build backend used by Hatch
URL            : https://pypi.org/project/hatchling
License        : MIT
Description    : This is the extensible, standards compliant build backend used by Hatch.
Vendor         : Fedora Project

They also have a page comparing against setuptools. I can see flit in the package repositories as well, but I'd have to do a bit more research on it and other backends.

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea how. On 2026-Feb-18 we won't be able to prepare builds with the setuptools version released then (see deprecation warning above). The migration phase is pretty short. Maybe we should postpone merging this PR until beginning of 2026?

There's also discussion here pypa/setuptools#4903, including comments pointing to distro versions of setuptools pypa/setuptools#4903 (comment).

Why is the version bump actually needed?

"wheel",
"setuptools_scm[toml]",
]
Expand All @@ -15,7 +15,8 @@ authors = [
]
description = "embedded systems control library for development, testing and installation"
readme = "README.rst"
license = { file="LICENSE" }
license = "LGPL-2.0-or-later"
license-files = ["LICENSE"]
Copy link
Contributor

Choose a reason for hiding this comment

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

These two lines look good

requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Developers",
Expand All @@ -29,7 +30,6 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
]
dependencies = [
"attrs>=21.4.0",
Expand Down