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
{{ message }}
Repository navigation
_warn_on_old_setuptools() warns incorrectly when using a custom build-backend #1192
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):
I'm getting the same problem trying to upgrade setuptools-scm=7.1.0 to 8.3.1 (with setuptools 68.0.0 installed):
/opt/sw/bin/python3.8 -m build --wheel --no-isolation --skip-dependency-check
* Building wheel...
/Users/nieder/src/setuptools_scm-8.3.1/src/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning:
ERROR: setuptools==8.3.1 is used in combination with setuptools-scm>=8.x
Your build configuration is incomplete and previously worked by accident!
setuptools-scm requires setuptools>=61
But if I manually load setuptools and check the version is a similar way as _warn_on_old_setuptools() does, it pulls the correct version of setuptools:
importsetuptools_version: str=setuptools.__version__print(_version)
ifint(_version.split(".")[0]) <61:
print(f"Version {_version} is less than 61")
else:
print(f"Version {_version} is greater than 61")
nieder $ /opt/sw/bin/python3.8 ~/Desktop/version_check.py
68.0.0
Version 68.0.0 is greater than 61
Both python3.8 and 3.10 fail the same way when trying to build setuptools_scm
@nieder do you happen to have a module called setuptools somewhere in your import path? If you replace -m with -Im, does anything change? What's your reproducer?
I don't have any other setuptools version installed anywhere. The setuptools-scm build still fails when using the -Im flag:
/opt/sw/bin/python3.8 -Im build --wheel --no-isolation --skip-dependency-check
* Building wheel...
/Users/nieder/src/setuptools_scm-8.3.1/src/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning:
ERROR: setuptools==8.3.1 is used in combination with setuptools-scm>=8.x
Your build configuration is incomplete and previously worked by accident!
setuptools-scm requires setuptools>=61
If by reproducer you mean minimal way to repeat the issue, this code saved as version_check.py then run prints out the correct version of setuptools.
$ /opt/sw/bin/python3.8 ~/Desktop/version_check.py
68.0.0
Version 68.0.0 is greater than 61
I also get the correct version if I copy setuptools-scm::setuptools.py outside the source tree and run that directly (after adding a print diagnostic inside _warn_on_old_setuptools and commenting out from .. import _config):
$ python3.8 -I setuptoolstest.py
Version is 68.0.0
But building the setuptools-scm wheel always errors with reporting the setuptools-scm version of the build tree as the installed setuptools version.
Simply git clone and follow the instructions in the README.
Interestingly, this doesn't cause any problems for me using my usual wheel creating command /opt/sw/bin/python3.10 -Im build --wheel --no-isolation --skip-dependency-check unlike setuptools-scm here
Adding print(inspect.getfile(setuptools)) inside setuptools-scm_v8.3.1::_warn_on_old_setuptools(), tells me my setuptools is here, which is the expected location:
Activity
RonnyPfannschmidt commentedon Aug 8, 2025
That's a entirely new one why is that version object changed
tych0 commentedon Aug 8, 2025
Yeah... something weird is happening. It is pretty easy to reproduce, 'make check-packaging' on qtile's git master should give it to you.
RonnyPfannschmidt commentedon Aug 8, 2025
I might not get to test this before next week as I'm down with a stomach bug
tych0 commentedon Aug 8, 2025
No problem, it's not urgent. It has been affecting us for a long time, but it's only a warning so not a blocker.
RonnyPfannschmidt commentedon Aug 17, 2025
based on jsut reading the code its unclear whats going on - can i get the output with
SETUPTOOLS_SCM_DEBUG=1webknjaz commentedon Aug 18, 2025
@tych0 FYI, your
pyproject.tomlseems to mistakenly containwheelin the list.tych0 commentedon Aug 21, 2025
hmm, doesn't seem like that gave me anything additional?
rwgk commentedon Jan 10, 2026
We're running into the same issue (https://github.com/NVIDIA/cuda-python)
Here is a minimal reproducer (LLM generated):
https://github.com/rwgk/setuptools-scm-issue-1192
Simply git clone and follow the instructions in the README.
nieder commentedon Jan 27, 2026
I'm getting the same problem trying to upgrade setuptools-scm=7.1.0 to 8.3.1 (with setuptools 68.0.0 installed):
But if I manually load setuptools and check the version is a similar way as
_warn_on_old_setuptools()does, it pulls the correct version of setuptools:Both python3.8 and 3.10 fail the same way when trying to build setuptools_scm
webknjaz commentedon Jan 27, 2026
@nieder do you happen to have a module called
setuptoolssomewhere in your import path? If you replace-mwith-Im, does anything change? What's your reproducer?nieder commentedon Jan 28, 2026
I don't have any other setuptools version installed anywhere. The setuptools-scm build still fails when using the
-Imflag:If by reproducer you mean minimal way to repeat the issue, this code saved as
version_check.pythen run prints out the correct version of setuptools.I also get the correct version if I copy setuptools-scm::setuptools.py outside the source tree and run that directly (after adding a print diagnostic inside _warn_on_old_setuptools and commenting out
from .. import _config):But building the setuptools-scm wheel always errors with reporting the setuptools-scm version of the build tree as the installed setuptools version.
nieder commentedon Jan 31, 2026
Interestingly, this doesn't cause any problems for me using my usual wheel creating command
/opt/sw/bin/python3.10 -Im build --wheel --no-isolation --skip-dependency-checkunlike setuptools-scm herenieder commentedon Jan 31, 2026
Adding
print(inspect.getfile(setuptools))inside setuptools-scm_v8.3.1::_warn_on_old_setuptools(), tells me my setuptools is here, which is the expected location:/opt/sw/lib/python3.8/site-packages/setuptools/init.py
RonnyPfannschmidt commentedon Jan 31, 2026
What's the version of the setuptools in that location
There are some issues with very old setuptools versions pulling in a mess
fix: remove _warn_on_old_setuptools() that warns incorrectly with cus…