BLD: issues while making macosx_arm64 natively on cirrus-ci (scipy) #1278
Description
Description
I'm trying to build scipy wheels for macosx_arm64
natively on cirrus-ci (in anticipation of scipy/scipy#17029, linux_aarch64 being merged). The work is being done in andyfaff/scipy#33.
Two matrix entries are for cp38 and cp39, see the build log here. For each of the builds meson thinks its doing a native build for x86_64, even though the CI is an arm64 machine:
Build type: native build
Project name: SciPy
Project version: 1.10.0.dev0
C compiler for the host machine: cc (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.3)")
C linker for the host machine: cc ld64 762
C++ compiler for the host machine: c++ (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.3)")
C++ linker for the host machine: c++ ld64 762
Host machine cpu family: x86_64
Host machine cpu: x86_64
The cibuildwheel infrastructure thinks the build machine is arm64:
platform: 'macos'
architectures: {<Architecture.arm64: 'arm64'>}
Prior to the cibuildwheel step I also query the machine (with a different Python interpreter installed using brew):
> python -c "import platform;print(platform.python_version());print(platform.system());print(platform.machine())"
3.10.4
Darwin
arm64
> uname -m
arm64
> clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Applications/Xcode-13.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
At the start of the build process (before meson runs) pip is trying to install numpy-1.19.5-cp38-cp38-macosx_10_9_x86_64.whl. This leads me to think there is something fishy going on with cibuildwheel/python setup/pip (that then causes the meson issue). Why would pip be trying to install an x86_64 wheel onto an arm64 machine?
pip gives the following output whilst considering pyproject.toml:
Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"' don't match your environment
Given that ostensibly the python version installed by cibuildwheel is 3.8.10
, the machine should be arm64
, and the platform should be Darwin, I don't know why the specific numpy requirement (1.21.0) isn't being obeyed.
I should note that in other matrix entry I build for 3.10 and 3.11. There the correct numpy for machine is installed, i.e. macosx_arm64
.
Build log
https://api.cirrus-ci.com/v1/task/4544934911934464/logs/cibuildwheel.log