Skip to content

Conversation

freakboy3742
Copy link

Backport of mesonbuild#14849.

Modifies iOS linking with the Python framework to use sys.base_prefix, rather than sys.prefix.

Outside of a venv, sys.prefix and sys.base_prefix are the same. However, if you're using a virtual environment. sys.prefix points at the location of the virtual environment, not the location of the iOS binaries. sys.base_prefix should be used to ensure that you're always referencing the underlying install location, not the venv location.

@mattip
Copy link
Member

mattip commented Jul 29, 2025

@rgommers do we want single backports or will there be a general meson update? Also relevant for numpy/numpy#29454

@rgommers
Copy link
Member

As commented in numpy/numpy#29454, I'm fine with small backports right now. Especially if they're this trivial and the PR is already opened:)

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @freakboy3742

@rgommers rgommers merged commit 5aa5dd5 into numpy:main-numpymeson Jul 29, 2025
4 of 27 checks passed
@freakboy3742 freakboy3742 deleted the numpy-ios-base-prefix branch July 29, 2025 22:27
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.

3 participants