-
Notifications
You must be signed in to change notification settings - Fork 68
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
Limit macOS platform tag by compiled deployment target? #524
Comments
Thanks for the report @QuLogic. This should be easy to change I think, at least to make it at least
That is a lot more work, with code that looks like it is fragile and has the potential to change over time, since it's fishing magic numbers out of binary files. The better way of doing that is probably to use The only way I can think of where this matters is if a user would not set |
How is this possible? The macOS platform version tag is intended to be interpreted as a minimum supported version, not as an exact match. Does I am not sure that setting What does the macOS toolchain on arm64 do when I definitely don't want to enter the busyness of parsing binaries to extract the compatibility version. |
I can say that installing was rejected on my ARM Mac for the matplotlib wheel. (It installed and appeared to work just changing the file name, though) It certainly seems like universal wheels will install, but arm only ones require at least 11.0. |
Yes, I double checked and
It silently upgrades it. Tried with setting the env var to 10.12 on PyWavelets, which produces a wheel with
That also shows the problem I had in mind when I said "fragile". The SO answer I linked higher up no longer works, the I think that we should make the easy change here, ensuring |
Note that what's described here is not necessarily invalid; the
From what we could understand of the code when we looked into it yesterday, |
Ah yes, right - that "iterate through valid tags" has bitten us before, it's probably fast but not all that healthy. I'd still say it's a |
Any chance we could get a release with this fixed out soon? I don't see anything on the 0.16.0 milestone that's open. |
We were recently notified that our moved-to-Meson nightly macOS arm64 wheels do not install. This is because they have a platform tag with
10_12
, but arm64 only existed on macOS 11 and above, so those wheels are never considered. These wheels are built with cibuildwheel using x86_64 and cross-compiled arm64 andMACOSX_DEPLOYMENT_TARGET=10.12
. So the10_12
does make sense from the environment variable point of view.However, our older wheels built with setuptools use this same environment, but get
11_0
in their platform tag.Some digging shows that
wheel
actually looks at all.dylib
and.so
in the produced wheel, and overrides the platform tag to pick a minimum version that matches the minimum deployment target of the compiled extensions. See also the pypa/wheel#314.A comment elsewhere indicates that Xcode will not produce a deployment target below 11 for arm64 builds.
So these two things work together in a setuptools-based build to produce a platform tag with
11_0
on Apple Silicon, even though the deployment target environment variable is set lower.For Matplotlib, we can work around this by splitting the job by arch and setting
MACOSX_DEPLOYMENT_TARGET
as necessary.But for meson-python, since it re-implements
wheel
, the question here is whether it should also implement the check on compiled extensions, and then pick a platform tag that reflects what's in the wheel?The text was updated successfully, but these errors were encountered: