scikit-build-core
scikit-build-core copied to clipboard
Unify wheel builders
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?
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.
Creating files specifically for editable installations via build hooks is possible with the force_include_editable build data option.
Creating files specifically for editable installations via build hooks is possible with the
force_include_editablebuild 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?
There is one for the project itself based on the name, prefixed by an underscore.
Yes, we'd need to make sure it's unique. And I'm not sure how they might interact.