Add companion package for editable packages with native extensions #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This package is intended to aid Nix-based Python development using editable installs.
This is to be used with build-systems such as
meson-python
that builds native extensions.It's purpose is similar to that of
python setup.py build_ext -i
, just using PEP-660.Problems
Of course this is not a perfect analogy to using something like
meson-python
directly.We just use the
.pth
machinery directly, whilemeson-python
uses a more complex hook machinery:Automatic inference of Python
meson-python
puts the editable build inbuild/cp312
.Users will have to manually override any editable root automatically inferred by Nix to point to the correct build directory.
Automatic rebuilds
Thanks to it's hook machinery
meson-python
can rebuild packages as necessary on load.This automatic rebuild behaviour will not work, and users will have to call
build-editable
manually.These are just two examples of build-system specific behaviour that will not work out of the box.
--
Note: This isn't final by any means. I'm exploring what the requirements are.