Skip to content

[BUG] Setuptools/wheel PEP517 Build requirements compliance #2986

Open
@jameshilliard

Description

@jameshilliard

Description

The PEP517 build requirements state:

Project build requirements will define a directed graph of requirements (project A needs B to build, B needs C and D, etc.) This graph MUST NOT contain cycles. If (due to lack of co-ordination between projects, for example) a cycle is present, front ends MAY refuse to build the project.

However front ends MAY have modes where they do not consider wheels when locating build requirements, and so projects MUST NOT assume that publishing wheels is sufficient to break a requirement cycle.

Currently wheel is not able to use setuptools for its PEP517 build due to a dependency cycle violation with wheel. Setuptools can also thus not use a PEP517 based wheel dependency as that would also violate the PEP517 build requirements.

It appears setuptools probably needs to vendor wheel as recommended in PEP517:

Note in particular that the requirement for no requirement cycles means that backends wishing to self-host (i.e., building a wheel for a backend uses that backend for the build) need to make special provision to avoid causing cycles. Typically this will involve specifying themselves as an in-tree backend, and avoiding external build dependencies (usually by vendoring them).

Expected behavior

Setuptools should not have a dependency cycle with wheel.

How to Reproduce

I have been writing a dependency cycle checker that can catch the wheel violation.

Output

ERROR Failed to validate `build-system` in pyproject.toml, dependency cycle detected: `wheel` -> `setuptools.build_meta` -> `wheel`

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions