Skip to content

[BUG]: Wheel build fails — invalid setuptools build backend in pyproject.toml #117

Description

@rederik76

Current Behavior

Building a wheel from v0.20.0 fails. Both python -m build and uv build error because pyproject.toml declares a build backend that does not exist in current setuptools releases:

build-backend = "setuptools.backends.legacy:build"

Example error (uv build --wheel -o dist):

ModuleNotFoundError: No module named 'setuptools.backends'

With build isolation enabled, uv build may also fail earlier while resolving setuptools>=68 from the internal PyPI proxy (network-dependent).

Expected Behavior

python -m build and uv build should produce dist/lakeflow_framework-0.20.0-py3-none-any.whl using the setuptools backend declared in pyproject.toml, with bundled config/default/** and schemas/** package data.

Steps To Reproduce

  1. Check out main at v0.20.0 (merged via refactor(package): stable lakeflow_framework import namespace with bundled config/schemas #87).

  2. From the repository root, run either:

    python -m build --wheel

    or:

    uv build --wheel --clear -o dist
  3. Observe build failure referencing setuptools.backends.legacy:build or No module named 'setuptools.backends'.

Relevant log output

Traceback (most recent call last):
  File "<string>", line 8, in <module>
    from setuptools.backends.legacy import build as backend
ModuleNotFoundError: No module named 'setuptools.backends'

(setuptools 82.x installed; setuptools.build_meta is the valid backend.)

Root cause

pyproject.toml on main (v0.20.0) references setuptools.backends.legacy:build. That module path is not present in setuptools 68+ / 82.x. The correct value is:

build-backend = "setuptools.build_meta"

ADR-0008 documents the same incorrect backend string in its example pyproject.toml snippet.

Proposed fix

  • Change build-backend to setuptools.build_meta in pyproject.toml.
  • Align the ADR-0008 example.
  • Bump VERSION to v0.20.1 (patch).
  • Optionally document uv build --wheel --clear -o dist as an alternative to python -m build in contributor dev-env docs.

Fix branch (ready for PR): fix/wheel-build-backend

Environment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions