Closed rcoup closed 2 months ago
It CI since it ends up with manylinux_2_99
or whatever, i'll try a slightly different tack.
Closed in favour of #986 for now.
I think the right future approach is probably one of:
manylinux
, universal2
, etcpython -m build -w[heel]
, but we need to know the wheel name upfront (which is where we get into the wheel-id mess) — either extract that into a script which could use wheel tags to remove/generalise tags after builds; or force it to build generic tags upfront (eg. cp312_linux_x86-64
).
Fix build issues on macOS with newer python interpreter releases.
Description
Python3.11, macOS 14
The issue is this bit:
cp311-cp311-macosx_14_0_0_arm64
should becp311-cp311-macosx_14_0_arm64
It comes from
Python3_WHEEL_ID
in CMake, calcuated from callingpython3 -m sysconfig
and friends incmake/PythonGetABIInfo.cmake
But with Py3.9 (also homebrew)
(which is correct)
I think it’s the difference between
Python3 interpreter platform tag: macosx-14-arm64
andPython3 interpreter macOS deployment target: 14.0
, so it used to bemacosx-(14)-arm64
→macosx_(14_0)_arm64
and now it’smacosx-(14).0-arm64
→macosx_(14_0)_0_arm64
Anyhow, there's a simpler approach (in theory, lets see what CI says).
pip debug -v
produces a big list, which is also available as:Grab the first/primary one, and use that instead. Drop all the other variables set in PythonGetABIInfo that aren't used anywhere else while we're at it.
Only behaviour change is warning if
CMAKE_OSX_DEPLOYMENT_TARGET
is different from the Python interpreter'sMACOSX_DEPLOYMENT_TARGET
rather than forcing it to the greater of the two. We pass this to pip/setuptools for building vendor wheels.Related links:
Checklist: