Skip to content
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

Pack prebuilt sdist minimal ci #4

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

tomjakubowski
Copy link
Owner

Pull Request Checklist

  • Description which clearly states what problems the PR solves.
  • Description contains a link to the Github Issue, and any relevent
    Discussions, this PR applies to.
  • Include new tests that fail without this PR but passes with it.
  • Include any relevent Documentation changes related to this change.
  • Verify all commits have been signed in accordance with the DCO policy.
  • Reviewed PR commit history to remove unnecessary changes.
  • Make sure your PR passes build, test and lint steps completely.

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>
@tomjakubowski tomjakubowski force-pushed the pack-prebuilt-sdist-minimal-ci branch 5 times, most recently from a62bc6b to 4043309 Compare October 31, 2024 04:18
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>
@tomjakubowski tomjakubowski force-pushed the pack-prebuilt-sdist-minimal-ci branch from 4043309 to 08a2d2d Compare October 31, 2024 04:19
@tomjakubowski tomjakubowski merged commit b5b3d7b into master Oct 31, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant