Skip to content

[FR] Allow bootstraping setuptools by running dependencies from source #2828

@FFY00

Description

@FFY00

What's the problem this feature will solve?

setuptools requires wheel to be installed to bootstrap itself, but wheel requires setuptools to build, preventing bootstrapping.

Even though setuptools now bootstraps itself via a PEP 517 builder, not everyone is able to do the same. Linux distributions, for example, need to bootstrap it from scratch.

Describe the solution you'd like

I would like an option, perhaps an environment variable, to skip the dependency checks, and to make the bdist_wheel command always available.
The easiest way to do this bootstrapping is to run everything from source, which trips up setuptools' dependency checks, and also as a consequence makes the bdist_wheel command unavailable.

Alternative Solutions

I have written https://github.com/FFY00/python-bootstrap to help with this task, but currently, I need to run setup.py egg_info on setuptools, copy that to the package directory, in order to trick setuptools to think it is installed, and then do the same for wheel, only after that I can actually build wheels for setuptools and wheel.
https://github.com/FFY00/python-bootstrap/blob/4004fda86bc82470b0ee1b564764f8ba9960b493/bootstrap/build.py#L43
https://github.com/FFY00/python-bootstrap/blob/bf68a5ff74706e348de1f3dddeaf51bc5f37a449/bootstrap/__init__.py#L109
See #2088 (comment) for more details.

Ideally, setuptools would actually be able to bootstrap itself without any dependencies.
See https://github.com/takluyver/flit/tree/master/flit_core for example.

Additional context

No response

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions