I’ve worked on PyTorch for a couple of years, including build & packaging stuff. I doubt that this has to do with the thin shim in setup.py
- the problem is simply that PyTorch is an extremely complex package itself and has ~30 submodules in third-party/
with also complex C++ code.
What packaging for other build systems typically does is (a) build a wheel, (b) unpack the wheel, and (c) repack it into the correct package format after doing what the tooling needs to do to make everything relocatable, strip debug info, etc… The wheel step is not very interesting, it’s just a convenient interface to be able to do pip install . --no-build-isolation
instead of figuring out for every package what the right setup.py
/ cmake
/ meson
/ ninja
invocations are.
+1 this is lacking pretty badly.
@henryiii congrats! Looking forward to collaborating to make building packages with native code easier:)
I’m not even sure what this means. meson-python
is a thin shim layer; Meson does all the heavy lifting. There’s a lot of little annoying things one has to do to comply to packaging standards (like wheel tags tend to be a cause of bugs). The most interesting parts of meson-python
are probably the UX ones, like “if I use pip
or build
, how do I pass along custom build options” or “how do I express the ABI compatibility constraints for depending on numpy
in pyproject.toml
in a sane way”.