You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the build-system requirements; resolve warnings and errors (#327)
* Update the build-system requirements; resolve warnings and errors
# The current situation
The current build-system requires setuptools 40.8.0 or higher.
However, setuptools v40.8.0 doesn't have a `build_meta` submodule.
To demonstrate the problem, the following commands were run:
```
python3.13 -m venv venv-3.13
source venv-3.13/bin/activate
python -m pip install setuptools==40.8.0 build
python -m build --no-isolation
```
This results in the following error message:
```
$ python -m build --no-isolation
* Getting build dependencies for sdist...
Traceback (most recent call last):
File ".../lib/python3.13/site-packages/pyproject_hooks/_impl.py", line 402, in _call_hook
raise BackendUnavailable(
...<4 lines>...
)
pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'
ERROR Backend 'setuptools.build_meta' is not available.
```
Upgrading to the latest version of setuptools, 80.9.0,
allows the package to build:
```
python -m pip install --upgrade setuptools
python -m build --no-isolation
```
However, warnings are emitted:
```
SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`.
You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
```
```
SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: Apache Software License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
```
# The solution
This change addresses the lower setuptools bound based on the warnings:
it sets the setuptools minimum version to v77.0.1
(v77.0.0 was not released to PyPI).
In addition, it addresses the license-related warnings
by switching to the SPDX short identifier `"Apache-2.0"`
and by removing the `License` trove classifier.
With this change in place, the package can be built
on the lowest supported setuptools version
as well as the latest released version.
* Feedback: Require `setuptools>=77.0.3`
From the PR comment:
> 77.0.3 fixes known early bugs of the PEP 639 implementation
---------
Co-authored-by: Mike Fiedler <miketheman@gmail.com>
0 commit comments