-
-
Notifications
You must be signed in to change notification settings - Fork 339
Use user-specified library search paths in RUSTFLAGS
in auditwheel
#2676
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
Merged
messense
merged 4 commits into
main
from
copilot/fix-b26080d2-c1ef-4e55-a218-fbc0213e76fa
Jul 13, 2025
Merged
Use user-specified library search paths in RUSTFLAGS
in auditwheel
#2676
messense
merged 4 commits into
main
from
copilot/fix-b26080d2-c1ef-4e55-a218-fbc0213e76fa
Jul 13, 2025
Conversation
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
Co-authored-by: messense <1556054+messense@users.noreply.github.com>
RUSTFLAGS
in auditwheel
Copilot finished work on behalf of
messense
July 12, 2025 23:15
messense
reviewed
Jul 13, 2025
…eview Co-authored-by: messense <1556054+messense@users.noreply.github.com>
Copilot finished work on behalf of
messense
July 13, 2025 02:42
@copilot please fix clippy warnings |
Co-authored-by: messense <1556054+messense@users.noreply.github.com>
Copilot finished work on behalf of
messense
July 13, 2025 03:12
messense
approved these changes
Jul 13, 2025
Copilot AI
added a commit
that referenced
this pull request
Jul 13, 2025
…2676) Fixes #2096 When repairing wheels for manylinux/musllinux compliance, maturin's auditwheel implementation now considers library search paths specified in `RUSTFLAGS` via `-L` options, in addition to the existing sources: - Paths from `<target>-gcc --print-sysroot` - `linked_paths` from cargo build script output (`cargo:rustc-link-search`) ## Changes - **Added rustflags parsing**: Uses the `rustflags` crate to parse cargo configuration and extract `-L` library search paths from `RUSTFLAGS` - **Extended auditwheel integration**: Modified `get_policy_and_libs()` to include rustflags library paths when finding external dependencies - **Preserved backward compatibility**: All existing functionality remains unchanged ## Example Users can now specify additional library search paths in their cargo configuration: ```toml # .cargo/config.toml [build] rustflags = [ "-L", "dependency=/usr/local/lib", "-L", "/custom/lib/path", "-C", "opt-level=3" ] ``` These paths will now be considered during wheel repair, improving compatibility for projects that link against libraries in non-standard locations. ## Testing - Added comprehensive tests for rustflags parsing functionality - All existing tests continue to pass - Code passes clippy and formatting checks <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: messense <1556054+messense@users.noreply.github.com>
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Aug 6, 2025
https://build.opensuse.org/request/show/1297806 by user mia + dimstar_suse - Update to 1.9.3 * Add support for RISC-V architecture in manylinux gh#PyO3/maturin#2694 * pyproject.toml: bump setuptools for PEP 639 gh#PyO3/maturin#2698 * Fix PEP 639 support for source distributions gh#PyO3/maturin#2704 * Fix relative README rewrite in source distributions gh#PyO3/maturin#2705 - Update to 1.9.2 * Respect PEP 621 dynamic fields when merging Cargo.toml metadata gh#PyO3/maturin#2672 * Only use all_features=true in sdist when local path dependencies exist gh#PyO3/maturin#2674 * auditwheel: add manylinux_2_26 policy gh#PyO3/maturin#2677 * Use user-specified library search paths in RUSTFLAGS in auditwheel gh#PyO3/maturin#2676 * pyproject.toml: add license-files gh#PyO3/maturin#2690 * Update manylinux/musllinux
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.
Fixes #2096
When repairing wheels for manylinux/musllinux compliance, maturin's auditwheel implementation now considers library search paths specified in
RUSTFLAGS
via-L
options, in addition to the existing sources:<target>-gcc --print-sysroot
linked_paths
from cargo build script output (cargo:rustc-link-search
)Changes
rustflags
crate to parse cargo configuration and extract-L
library search paths fromRUSTFLAGS
get_policy_and_libs()
to include rustflags library paths when finding external dependenciesExample
Users can now specify additional library search paths in their cargo configuration:
These paths will now be considered during wheel repair, improving compatibility for projects that link against libraries in non-standard locations.
Testing
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.