Skip to content

_warn_on_old_setuptools() warns incorrectly when using a custom build-backend #1192

@tych0

Description

@tych0

Qtile has a custom build-backend: https://github.com/qtile/qtile/blob/master/pyproject.toml#L10

When I run something like check-manifest, I get:

uv run  check-manifest
lists of files in version control and sdist match
uv run  python3 -m build --sdist .
* Creating isolated environment: virtualenv+pip...
* Installing packages in isolated environment:
  - cairocffi[xcb]>=1.6.0
  - cffi>=1.1.0
  - setuptools-scm>=7.0
  - setuptools>=61
  - wheel
* Getting build dependencies for sdist...
/tmp/build-env-u52_juhz/lib/python3.12/site-packages/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning:
ERROR: setuptools==0.33.1.dev27+g9ffbf677.d20250808 is used in combination with setuptools-scm>=8.x

Your build configuration is incomplete and previously worked by accident!
setuptools-scm requires setuptools>=61

Suggested workaround if applicable:
 - migrating from the deprecated setup_requires mechanism to pep517/518
   and using a pyproject.toml to declare build dependencies
   which are reliably pre-installed before running the build tools

  warnings.warn(

but the version it complains about is the current version of qtile, not the version of setuptools. I don't really understand why this would happen, we aren't doing anything fancy with our build backend (though we do import a bunch of setuptools stuff as well):

https://github.com/qtile/qtile/blob/master/builder.py

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