Add executable artifacts with shared-scripts install scheme#62
Merged
Conversation
Support shipping Rust binaries (bin/example targets) in wheels, in
addition to the existing cdylib extension modules.
- New "shared-scripts" install scheme places an artifact in the wheel's
.data/scripts/ directory so `pip install` puts it on PATH (the
executable equivalent of shared-data).
- Executable artifacts (cargo-target-kind bin/example) are now copied:
previously they fell through to the cdylib path and failed looking for
a lib<name> shared library.
- Skip the implicit --crate-type cdylib rustc arg for executables, which
would otherwise build a binary target as a library.
- Add an executable_name() helper and a {executable} destination token.
- Route both compiled and generated outputs through shared-scripts, and
forward shared_scripts from the build plan to hatchling build_data.
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 81.01% 81.40% +0.38%
==========================================
Files 10 10
Lines 1354 1441 +87
==========================================
+ Hits 1097 1173 +76
- Misses 257 268 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
Support shipping Rust binaries (bin/example targets) in wheels, in addition to the existing cdylib extension modules.
pip installputs it on PATH (the executable equivalent of shared-data).