-
Notifications
You must be signed in to change notification settings - Fork 69
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
0.9.0 release produces macOS wheel platform tag that cannot be installed on Homebrew Python #160
Comments
So the issue is that The accepted tags are: >>> from packaging import tags
>>> list(tags.mac_platforms())
['macosx_12_0_arm64',
'macosx_12_0_universal2',
'macosx_11_0_arm64',
'macosx_11_0_universal2',
'macosx_10_16_universal2',
'macosx_10_15_universal2',
'macosx_10_14_universal2',
'macosx_10_13_universal2',
'macosx_10_12_universal2',
'macosx_10_11_universal2',
'macosx_10_10_universal2',
'macosx_10_9_universal2',
'macosx_10_8_universal2',
'macosx_10_7_universal2',
'macosx_10_6_universal2',
'macosx_10_5_universal2',
'macosx_10_4_universal2'] That code is then used by Resetting the minor version like that is only justified if it's 100% guaranteed that minor versions are forward and backwards compatible. It's still not a great thing for |
The main discussion focused on minor versions at the end, and pypa/packaging#319 (comment) says that (as one would expect) this is indeed not guaranteed. So the |
More archeology, from pypa/wheel#385: the numbering of macOS has changed from In order to actually remove the minor version we'd have to coordinate with wheel (and maybe create a PEP?) Instead we just pin the minor version to 0. Please pin the minor version to 0 and treat Now let's test if this is actually true. Write a little test file #include<stdio.h>
int main()
{
printf("\nthis is main file");
} Now let's build for different minor versions, and see if they are the same:
So yes and no. You are allowed to set the deployment target to a minimum version, and that info is kept in the produced binary. And presumably that won't then run on an older minor version - so technically |
@FFY00 let's copy the relevant lines of the |
I did some more testing and verified that both Clang and GCC do honor % echo $MACOSX_DEPLOYMENT_TARGET
% clang tmp.c -o current-os.o
% otool -l current-os.o | grep minos
minos 12.0
% export MACOSX_DEPLOYMENT_TARGET=12.2
% clang tmp.c -o current-os.o
% otool -l current-os.o | grep minos
minos 12.2 So it looks like there's nothing Meson needs to be doing. Not sure what the deal is with CMake explicitly handling that env var, its code is not very understandable. tl;dr all we should be doing is forcing the minor version to zero for macOS >= 11. And documenting that if the env var is set, please do set the minor version to zero. |
I can confirm that this fixes the reported problem (tested with meson-python 0.10.0). Thanks all! |
The problem appears to have returned, this time affecting macOS Ventura (13). Reported in https://trac.sagemath.org/ticket/34658#comment:17; I have not reproduced it yet. |
It seems that |
that's what I see on an intel macOS 13
With the Python I see scipy build error, I get
So it seems that |
packaging says it's basically the same bug as with macOS 12, see pypa/packaging#578 |
#191 makes |
Also fails on macOS Catalina (10.15.7) |
I think this was fixed again by gh-202. If not, it'd be better to open a new issue so we don't lose track of this. |
Thanks, I'll wait for the next release to test |
@mkoeppe noticed a problem with macOS wheel tags with Homebrew Python on Sage, see https://github.com/FFY00/meson-python/issues/91#issuecomment-1263004679. The linked Sage issue (https://trac.sagemath.org/ticket/34081#comment:90) shows:
@mkoeppe can you confirm that you built this wheel on macOS 12.6? If so, the wheel tag should be correct. However, there is a problem of course if
pip
refuses to install it, which we may have to work around.Also, can you determine when it is installable? If you rename the wheel from
12_6
to say12_3
,12_0
,11_0
, it should become installable.The text was updated successfully, but these errors were encountered: