Ship rerun package inside of a rerun_sdk folder #1085
Merged
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.
The new layout inside of site-packages is now:
To make this all work, we had to move the
rerun
folder inside thererun_sdk
folder as it will appear when deployed. A little bit annoying for development, but still manageable and at least it reflects reality.The biggest complication here was continuing to make
maturin develop
work as expected.The problem is that
maturin develop
installs it's own .pth that wants to point to the top of the package.This means it ends up pointing to
rerun_py
instead ofrerun_sdk
.Sadly,
.pth
files don't chain, and maturin doesn't (yet) have a mechanism to allow us to overridethe dev path that it adds for us. So, we work around this by adding a stub
rerun
package that reimportsthe real one. It's a bit ugly, but only applies to folks running maturin dev and will never be seen by folks
working with installed package.
With these changes the following now works as exepcted:
TODO:
Checklist
CHANGELOG.md
(if this is a big enough change to warrant it)