Skip to content

pyproject.toml: Add setuptools to deps#2623

Open
schwehr wants to merge 1 commit into
gee-community:masterfrom
schwehr:fix-docs-build
Open

pyproject.toml: Add setuptools to deps#2623
schwehr wants to merge 1 commit into
gee-community:masterfrom
schwehr:fix-docs-build

Conversation

@schwehr

@schwehr schwehr commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator
 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]

```
 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]
```

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread pyproject.toml
build_cmd = "build"

[tool.uv.extra-build-dependencies]
backends = ["setuptools"]

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
backends = ["setuptools"]
pyarrow = ["setuptools"]

Copilot uses AI. Check for mistakes.
@jdbcode

jdbcode commented Feb 19, 2026

Copy link
Copy Markdown
Member

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.

@jdbcode jdbcode assigned schwehr and unassigned jdbcode Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants