Enable auto-rebuild in scikit-build-core at import time
#27
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.
Closes MET-41
Summary of Changes
scikit-build-corehas aneditable.rebuildoption, which can automatically invoke CMake under the hood when we import fromgenmetaballsto rebuild the C++ extension if needed. To use this option, we need to turn off build isolation for our package so that scikit build can use the right set of tools (see scikit-build/scikit-build-core#1112 (comment)). On the other hand, this also makes rebuilding a lot faster because Pixi doesn't have to re-create a new isolated environment and build from scratch.See
scikit-build-core's official doc on editable install for more details.With this change, we shouldn't need to manually run
pixi reinstall genmetaballsanymore. Hopefully this will make our development experience a bit smoother :).Test Plan
After enabling this option & run
pixi reinstall genmetaballsone last time just to make sure that the config is active. Then, I tried modifying a couple of the C++ files, then runpixi run testimmediately after (without runningreinstallmanually), and the changes are correctly reflected on the Python test results.