scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

Unify wheel builders

Open LecrisUT opened this issue 1 year ago • 5 comments

I was looking at why the hatch plugin isn't able to run as editable, and it seems that it is mostly because these are diverging implementations. I am thinking we should refactor these to make one common WheelBuilder with a build_wheel that is common with the plugins, and install_wheel that is specific to the build.build_wheel part. Any thoughts on how to approach this?

LecrisUT avatar Aug 30 '24 12:08 LecrisUT

This might not help with the Hatch plugin, as the reason it doesn't support editable installs is because it handles the wheel, not scikit-build-core. I was thinking we can't write a .pth files, it makes one for us. Though actually, maybe it can be done, I'm now wondering if it's possible.

builder is supposed to be the common code, and the stuff in build is wheel-specific. Plugins don't make wheels, they just provided files for setuptools/hatch/etc. to put in their wheels.

We should first see if we can do this with hatchling.

henryiii avatar Sep 07 '24 06:09 henryiii

Creating files specifically for editable installations via build hooks is possible with the force_include_editable build data option.

ofek avatar Sep 10 '24 14:09 ofek

Creating files specifically for editable installations via build hooks is possible with the force_include_editable build data option.

Hmm, but does hatchling provide its own .pth editable file and if so would adding a file with the same name basically override it?

LecrisUT avatar Sep 10 '24 14:09 LecrisUT

There is one for the project itself based on the name, prefixed by an underscore.

ofek avatar Sep 10 '24 14:09 ofek

Yes, we'd need to make sure it's unique. And I'm not sure how they might interact.

henryiii avatar Sep 10 '24 14:09 henryiii