setuptools icon indicating copy to clipboard operation
setuptools copied to clipboard

Add tool to help with "bootstraping" build

Open abravalheri opened this issue 1 year ago • 3 comments

Summary of changes

Now that wheel is vendored, setuptools can be bootstrapped in a relatively easy way, without the need of python setup.py install/develop/....

This PR adds a small script that follows PEP 517 (or at least a stripped down version of it, super-specialised for setuptools) + general instructions to the "Development Guide".

Closes #2828 Closes #2532 ? (pip install -e . already works fine for devs that have access to pip, so the only missing piece was bootstrapping)

Pull Request Checklist

abravalheri avatar May 23 '24 17:05 abravalheri

Hi @jaraco, do think we should pursue something like this for setuptools?

abravalheri avatar May 23 '24 18:05 abravalheri

I do wonder if Setuptools should be in the business of providing the bootstrapping tool. IMO, if a downstream packager can't use pip, they should write their own PEP 517 builder/installer (that is, they should maintain it and not setuptools).

@FFY00 How do you feel about the approach? Should Setuptools provide this or could it be maintained outside setuptools?

I don't have any complains about this, but I'd note the reason why downstream packagers usually can't use pip is because it vendors dependencies, and devendoring them for bootstrap is a mess. In Arch Linux, for example, we would similarly want to devendor the wheel dependency.

That said, this script, however, would be helpful regardless.

FFY00 avatar May 28 '24 12:05 FFY00

I do wonder if Setuptools should be in the business of providing the bootstrapping tool. IMO, if a downstream packager can't use pip, they should write their own PEP 517 builder/installer (that is, they should maintain it and not setuptools). @FFY00 How do you feel about the approach? Should Setuptools provide this or could it be maintained outside setuptools?

I don't have any complains about this, but I'd note the reason why downstream packagers usually can't use pip is because it vendors dependencies, and devendoring them for bootstrap is a mess. In Arch Linux, for example, we would similarly want to devendor the wheel dependency.

That said, this script, however, would be helpful regardless.

There's no reason to do this. There is a clear bootstrapping path starting from flit_core which provides you fully working pypa/build and pypa/installer which you can then use to process pypa/wheel and finally pypa/setuptools and pypa/pip. Setuptools is not the beginning of PEP517 bootstrap chain and does not need to implement special tools. It does, however, need to support building itself with in-tree backend which is currently broken with newest pyproject-hooks.

nanonyme avatar Jul 28 '24 09:07 nanonyme

Not sure why this wasn't merged. I'm going to close, but feel free to re-open and merge instead.

jaraco avatar May 31 '25 18:05 jaraco