Issue #1905 - Part 3a - Resign python binary ad-hoc since install_name_tool invalidates code signature. The code signature is invalidated on Intel as well, but on ARM the binary fails to run with an invalid code signature error.

This commit is contained in:
Brian Smith 2022-06-09 14:12:00 -05:00 committed by roytam1
commit 9f3376e56d

View file

@ -1345,6 +1345,9 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
"have Apple's development tools installed")
raise
# Resign the executable, since install_name_tool invalidates the signature
call_subprocess(["codesign", "-s", "-", py_executable])
if not is_win:
# Ensure that 'python', 'pythonX' and 'pythonX.Y' all exist
py_exe_version_major = 'python%s' % sys.version_info[0]