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

Add an API to set rpath when using macOS system Python #4833

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

messense
Copy link
Member

@messense messense commented Jan 1, 2025

Because of rust-lang/cargo#9554 we can not do it automatically, I think adding an API is better than ask users to hardcode it in build.rs or .cargo/config.toml.

@messense messense force-pushed the macos-framework-rpath branch from 1bb8ba1 to 0492f55 Compare January 1, 2025 14:06
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me, thanks 👍

@davidhewitt
Copy link
Member

Ah, CI failing.

@messense messense force-pushed the macos-framework-rpath branch from 0492f55 to 8545853 Compare January 2, 2025 00:17
@messense messense force-pushed the macos-framework-rpath branch from 8fc29a1 to c467d9e Compare January 2, 2025 05:48
@messense messense added this pull request to the merge queue Jan 2, 2025
Merged via the queue into PyO3:main with commit f08bc95 Jan 2, 2025
46 checks passed
@messense messense deleted the macos-framework-rpath branch January 2, 2025 07:19
JeanArhancet pushed a commit to JeanArhancet/pyo3 that referenced this pull request Jan 17, 2025
geofft added a commit to geofft/pyo3 that referenced this pull request Feb 3, 2025
Relocatable Python installations like python-build-standalone have a
similar need for an rpath as the macOS framework builds in Xcode.
Furthermore, the platform on which you build your code is not really a
function of the code itself. This change generalizes the recent
`add_python_framework_link_args()` from PyO3#4833 to
`add_python_link_args()`, which also does the right thing on
python-build-standalone, and encourages everyone to set up a build.rs
file that invokes it, whether or not they need it on their current
machine.
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.

2 participants