conda-forge / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
46 stars 105 forks source link

Change in HOST_GNU_TYPE for latest python builds | osx-arm64 #621

Closed nehaljwani closed 1 year ago

nehaljwani commented 1 year ago

There is a subtle difference in the recent builds of python:

❯❯❯ diff /Users/nwani/.conda/pkgs/python-3.11.0-h3ba56d0_1_cpython/lib/python3.11/_sysconfigdata__darwin_darwin.py /Users/nwani/.conda/pkgs/python-3.11.0-h93c2e33_0_cpython/lib/python3.11/_sysconfigdata__darwin_darwin.py | grep HOST_GNU_TYPE
<  'HOST_GNU_TYPE': 'aarch64-apple-darwin20.0.0',
>  'HOST_GNU_TYPE': 'arm64-apple-darwin20.0.0',

This affects crossenv as it relies on HOST_GNU_TYPE to determine the output for os.uname().machine and platform.uname().machine

At the moment, cross builds print the following warning:

WARNING: The cross-compiler ('arm64-apple-darwin20.0.0-clang') does not appear to be for the correct architecture (got arm64-apple-darwin20.0.0, expected aarch64-apple-darwin20.0.0). Use --cc to correct, if necessary.

And $PYTHON -c 'import os; print(os.uname().machine)' outputs:

uname_result(sysname='Darwin', nodename='build', release='20.0.0', version='', machine='aarch64')

Instead of:

uname_result(sysname='Darwin', nodename='build', release='20.0.0', version='', machine='arm64')

This is causing issues with pip install /path/to/generated/wheel erroring out with:

<pkg>-<version>-cpXY-cpXY-macosx_11_0_arm64.whl is not a supported wheel on this platform