pyproject.toml: Add setuptools to deps#2623
Conversation
schwehr
commented
Feb 19, 2026
```
Downloaded gradio
× Failed to download and build `keplergl==0.3.7`
├─▶ Failed to install requirements from `build-system.requires`
├─▶ Failed to build `pyarrow==16.0.0`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit
status: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
requires = get_requires_for_build({})
File
"/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp1nGktH/lib/python3.13/site-packages/setuptools/build_meta.py",
line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp1nGktH/lib/python3.13/site-packages/setuptools/build_meta.py",
line 301, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File
"/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp1nGktH/lib/python3.13/site-packages/setuptools/build_meta.py",
line 520, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/runner/work/_temp/setup-uv-cache/builds-v0/.tmp1nGktH/lib/python3.13/site-packages/setuptools/build_meta.py",
line 317, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 34, in <module>
ModuleNotFoundError: No module named 'pkg_resources'
hint: This error likely indicates that `pyarrow@16.0.0` depends on
`pkg_resources`, but doesn't declare it as a build dependency. If
`pyarrow` is a first-party package, consider adding `pkg_resources`
to its `build-system.requires`. Otherwise, either add it to your
`pyproject.toml` under:
[tool.uv.extra-build-dependencies]
```
d973146 to
6954098
Compare
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a build failure when installing the keplergl package (a dependency in the "backends" optional dependency group) by adding setuptools to uv's extra build dependencies. The error occurs because pyarrow==16.0.0 (a transitive dependency of keplergl) requires pkg_resources during its build process, which is provided by setuptools.
Changes:
- Added
[tool.uv.extra-build-dependencies]section to configure additional build dependencies for packages built by uv
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| build_cmd = "build" | ||
|
|
||
| [tool.uv.extra-build-dependencies] | ||
| backends = ["setuptools"] |
There was a problem hiding this comment.
The configuration structure for tool.uv.extra-build-dependencies appears to be incorrect. According to uv's documentation and the error message in the PR description, extra-build-dependencies should map package names to their required build dependencies, not use feature/extra names like "backends" as keys.
The correct format should be:
[tool.uv.extra-build-dependencies]
keplergl = ["setuptools"]or
[tool.uv.extra-build-dependencies]
pyarrow = ["setuptools"]Since the error occurs when building pyarrow==16.0.0 (a dependency of keplergl), you should specify which package needs setuptools as a build dependency. The error message indicates pyarrow's build process is missing pkg_resources (from setuptools), so it would be most accurate to specify pyarrow as the key.
| backends = ["setuptools"] | |
| pyarrow = ["setuptools"] |
|
Kurt, I'm not familiar with UV. I had Copilot review. Does its conclusion make sense to you? I assume after you made your change the build was successful. So, I'm not sure that its recommendation is correct/required. |