Repository: onnx/onnx

Issue:
MacOS release action is failing.
### Description

(https://github.com/actions/setup-python/issues/855)

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->



Discussion:
## Test Results
     3 files  ±0       3 suites  ±0   1m 58s :stopwatch: -13s
 7 486 tests ±0   4 456 :white_check_mark: ±0  3 030 :zzz: ±0  0 :x: ±0 
22 441 runs  ±0  13 261 :white_check_mark: ±0  9 180 :zzz: ±0  0 :x: ±0 

Results for commit 7e0332cc. ± Comparison against base commit 4e7289d0.

[test-results]:data:application/gzip;base64,H4sIAKwMMGYC/02Myw6DIBBFf8Ww7gKYQaE/0+AUElIfDcLK9N+LrajLc27uWZkPg1vYvYFbw5Yc0gHPHG0K81RQCF1EmdI2dqjbio8lExWHqC7uFd5bhAM/nLdhKO4ULsY57ibmaQtLiSh2rGEBsj3dP2yErq9r98fXLM3jGFIB1jkOIIkMIPfOUC81OSt6RVJZsBaV9sa1xD5f2zSosREBAAA=

:recycle: This comment has been updated with latest results.
@liqunfu would I be correct in guessing I'd also need to pull this into 1.16.1 (after it merges into main) to resolve the MacRelease check issues I'm seeing in https://github.com/onnx/onnx/pull/6108? 
Does the change fix the error?
> @liqunfu would I be correct in guessing I'd also need to pull this into 1.16.1 (after it merges into main) to resolve the MacRelease check issues I'm seeing in #6108?

This 

> @liqunfu would I be correct in guessing I'd also need to pull this into 1.16.1 (after it merges into main) to resolve the MacRelease check issues I'm seeing in #6108?

We need the fix in order to build wheels to be published. Unless there is already wheels built, tested, and ready to upload to pypi, we need fix the issue this PR is targeting. Hopefully github team can the issue without this PR: https://github.com/actions/setup-python/issues/855.
> Does the change fix the error?

no. the issue is with setup python: https://github.com/actions/setup-python/issues/855. We need to first wait to see if github team has a solution to the original issue. We will then see if a PR is needed with the solution.
> We need to first wait to see if github team has a solution to the original issue. We will then see if a PR is needed with the solution.

I wouldn't hold my breath on a solution in the short term given at least Python 3.8 & 3.9 are built from sources with homebrew dependencies on macOS x86_64.

My 2 cents, either:
- use `macos-12` instead of `macos-latest`: it was the previous latest when the workflow was last successful and is x86_64
- change `host-architecture` from `x64` to `arm64`: the architecture of the runner changed when moving from `macos-12` to `macos-14`, it shall probably be reflected here.

The first one comes with no risk in the short term (moving away from macOS-12 will need to happen at some point).
The second one will probably unveil other failures later in the workflow that will require more fixes.



Is it possible to create x64 universal builds from arm64?

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -51,8 +51,8 @@
 DEBUG = os.getenv("DEBUG", "0") == "1"
 COVERAGE = os.getenv("COVERAGE", "0") == "1"
 
-# Customize the wheel plat-name, usually needed for MacOS builds.
-# See usage in .github/workflows/release_mac.yml
+# Customize the wheel plat-name; sometimes useful for MacOS builds.
+# See https://github.com/onnx/onnx/pull/6117
 ONNX_WHEEL_PLATFORM_NAME = os.getenv("ONNX_WHEEL_PLATFORM_NAME")
 
 ################################################################################


Test patch: