-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix perspective-python
sdist and add sdist tests to CI
#2817
Merged
texodus
merged 2 commits into
finos:master
from
tomjakubowski:pack-prebuilt-sdist-minimal-ci
Oct 31, 2024
Merged
Fix perspective-python
sdist and add sdist tests to CI
#2817
texodus
merged 2 commits into
finos:master
from
tomjakubowski:pack-prebuilt-sdist-minimal-ci
Oct 31, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This updates the perspective-python build to create an sdist tarball by hand, not going through `maturin sdist`. This bypasses some issues we have seen with Maturin mispackaging the perspective Cargo workspace in the sdist. Maturin is still used as the `build-backend` to build a wheel from the sdist. CI still uses `maturin build` to build wheels. Local development builds still use `maturin develop`. The sdist now includes the .data directory so that Maturin will place it in the wheel correctly. Building an sdist with PSP_BUILD_SDIST=1 will now error if it appears the jupyterlab plugin was not built into the .data directory. Most of the work is in generating a PKG-INFO file. Its output matches what's in the 3.1.2 sdist on pypi, minus a correction to fix the `Home-page` field miscapitalized by Maturin and some unimportant whitespace changes in `Require-Dist`. Signed-off-by: Tom Jakubowski <tom@prospective.dev>
50a472d
to
1953d56
Compare
1953d56
to
105ec64
Compare
a62bc6b
to
4043309
Compare
caveat: a ~/.cargo/config.toml file is created when testing the sdist which patches the perspective-python build so that it uses perspective-server and perspective-client from the local git checkout. This is so we can test unreleased changes to those crates together, without including the client/server source in the sdist. Builders who download sdist artifacts produced in CI between releases may find they don't build or work correctly, since those sdists will contain dependencies on release versions of perspective-server and perspective-client published to crates.io. Signed-off-by: Tom Jakubowski <tom@prospective.dev>
4043309
to
08a2d2d
Compare
perspective-python
sdist and add sdist tests to CI
texodus
reviewed
Oct 31, 2024
@@ -765,7 +828,7 @@ jobs: | |||
publish: | |||
needs: | |||
[ | |||
build_and_test_juptyerlab, | |||
build_and_test_jupyterlab, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯
texodus
approved these changes
Oct 31, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Looks good!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 updates the perspective-python build to create an sdist tarball by
hand, not going through
maturin sdist
. This bypasses some issues wehave seen with Maturin mispackaging the perspective Cargo workspace in
the sdist.
Maturin is still used as the
build-backend
to build a wheel from thesdist. CI still uses
maturin build
to build wheels. Localdevelopment builds still use
maturin develop
.The sdist now includes the .data directory so that Maturin will place it
in the wheel correctly. Building an sdist with PSP_BUILD_SDIST=1 will
now error if it appears the jupyterlab plugin was not built into the
.data directory.
Most of the work is in generating a PKG-INFO file. Its output matches
what's in the 3.1.2 sdist on pypi, minus a correction to fix the
Home-page
field miscapitalized by Maturin and some unimportantwhitespace changes in
Require-Dist
.