[CI] Reformat the macOS repair-wheel-command as a multiline script#19664
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the macOS repair-wheel-command in pyproject.toml into a multi-line script to improve readability and handle re-signing of Mach-O binaries after delocation. A critical issue was identified where using {dest_dir} for intermediate steps and globbing/deleting wheel files could cause build failures or delete other wheels in a shared environment. It is recommended to use a separate temporary directory for intermediate delocated wheels as suggested.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
6a94913 to
93b9f59
Compare
|
@tvm-bot rerun |
The single-line 'bash -c' form is hard to read and edit; rewrite it as a readable multiline command. Functionally equivalent to the previous inline version: delocate the wheel, then ad-hoc re-sign every bundled Mach-O and repack. The re-sign step is required because delocate's edits invalidate the ad-hoc signature of tvm/lib/libtvm_runtime.dylib (which links the excluded libtvm_ffi.dylib, shipped in the separate apache-tvm-ffi package), and arm64 dyld SIGKILLs an invalidly-signed Mach-O on import. 'wheel' is installed explicitly since it is absent from cibuildwheel's repair venv, and the delocated wheel is located by glob since delocate may retag it.
93b9f59 to
6a72fce
Compare
The single-line 'bash -c' form is hard to read and edit; rewrite it as a readable multiline command. Functionally equivalent to the previous inline version: delocate the wheel, then ad-hoc re-sign every bundled Mach-O and repack.
The re-sign step is required because delocate's edits invalidate the ad-hoc signature of tvm/lib/libtvm_runtime.dylib (it LC_LOADs the excluded
rpath/libtvm_ffi.dylib, which ships in the separate apache-tvm-ffi package), and arm64 dyld SIGKILLs an invalidly-signed Mach-O on import. 'wheel' is installed explicitly since it is absent from cibuildwheel's repair venv, and the delocated wheel is located by glob since delocate may retag it.