Delete arm64 only file in Mac wheel

Fixes https://github.com/google/mediapipe/issues/4888#issuecomment-1768861583

PiperOrigin-RevId: 574938905
This commit is contained in:
Sebastian Schmidt 2023-10-19 11:10:53 -07:00 committed by Copybara-Service
parent 66570c3dfc
commit 2d0d258403

View File

@ -404,6 +404,8 @@ class BuildExtension(build_ext.build_ext):
arm64_name, arm64_name,
] ]
_invoke_shell_command(lipo_command) _invoke_shell_command(lipo_command)
# Delete the arm64 file (the x86 file was overwritten by lipo)
_invoke_shell_command(['rm', arm64_name])
else: else:
for ext in self.extensions: for ext in self.extensions:
self._build_binary(ext) self._build_binary(ext)