Repository navigation
[macOS/ARM64] Add pip req arm64 - #5500
Merged
Merged
Conversation
JuanMBriones
force-pushed
the
add_pip_req_arm64
branch
from
September 25, 2026 23:02
38eb3ca to
6d5f2e8
Compare
When packaging bot deployment bundles on a Linux host via `butler package`, `_install_pip()` installs all packages from `Pipfile.lock` (including transitive dependencies with Linux x86_64 ELF shared objects) into `src/third_party`. `_install_platform_pip()` then downloads pre-compiled binary wheels for each package listed in `src/platform_requirements.txt` to replace the Linux binaries with target platform native binaries. Previously, `markupsafe` and `pynacl` were transitive dependencies containing compiled C/CFFI extensions that were missing from `src/platform_requirements.txt`: * `markupsafe==3.0.3` (transitive dependency of `Jinja2==3.1.4` / `Flask`): contains the compiled C extension `markupsafe/_speedups.cpython-*.so`. Without it in `platform_requirements.txt`, the Linux ELF `.so` remained in the macOS ARM64 bundle. * `pynacl==1.6.0` (transitive dependency of `pygithub==1.55`): contains the compiled libsodium CFFI native binary `nacl/_sodium.abi3.so`. Without it in `platform_requirements.txt`, importing `github` / `nacl` on macOS ARM64 fails with `ImportError: dlopen(.../nacl/_sodium.abi3.so): not a mach-o file`. Adding both packages ensures `butler package -p macos_arm64` downloads the native macOS ARM64/universal2 wheels (`markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl` and `pynacl-1.6.0-cp38-abi3-macosx_10_10_universal2.whl`) into `src/third_party`. Bug: 555853673 Signed-off-by: Manuel Briones <manuelbriones@google.com>
JuanMBriones
force-pushed
the
add_pip_req_arm64
branch
from
September 25, 2026 23:08
6d5f2e8 to
d6c1938
Compare
g-ortuno
approved these changes
Sep 28, 2026
Collaborator
|
Adding this to the GOSST Review queue. |
ViniciustCosta
approved these changes
Sep 29, 2026
Collaborator
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same changes as #5468. Faced a bug while using gh stack github/gh-stack#385. The past PR is claimed to be "merged" but it isn't.
When packaging bot deployment bundles on a Linux host via butler package,
_install_pip() installs all packages from Pipfile.lock (including
transitive dependencies with Linux x86_64 ELF shared objects) into
src/third_party. _install_platform_pip() then downloads pre-compiled
binary wheels for each package listed in src/platform_requirements.txt
to replace the Linux binaries with target platform native binaries.
Previously, markupsafe and pynacl were transitive dependencies containing
compiled C/CFFI extensions that were missing from
src/platform_requirements.txt:
markupsafe==3.0.3 (transitive dependency of Jinja2==3.1.4 / Flask):
contains the compiled C extension markupsafe/_speedups.cpython-*.so.
Without it in platform_requirements.txt, the Linux ELF .so remained in
the macOS ARM64 bundle.
pynacl==1.6.0 (transitive dependency of pygithub==1.55): contains the
compiled libsodium CFFI native binary nacl/_sodium.abi3.so. Without it in
platform_requirements.txt, importing github / nacl on macOS ARM64 fails
with ImportError: dlopen(.../nacl/_sodium.abi3.so): not a mach-o file.
Adding both packages ensures butler package -p macos_arm64 downloads the
native macOS ARM64/universal2 wheels (markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl
and pynacl-1.6.0-cp38-abi3-macosx_10_10_universal2.whl) into src/third_party.
Bug: 555853673