summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-06-09 14:12:00 -0500
committerBrian Smith <brian@dbsoft.org>2022-06-09 14:12:00 -0500
commitad1bd19571f3d958d69d8eb360898e0d37356533 (patch)
treefcfdfc4d0f0e47478b29786cdfb694edb65e3db0 /python
parente65f15fb4c7dc697063fb031184b71cb8cd97173 (diff)
downloaduxp-ad1bd19571f3d958d69d8eb360898e0d37356533.tar.gz
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.
Diffstat (limited to 'python')
-rwxr-xr-xpython/virtualenv/virtualenv.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/virtualenv/virtualenv.py b/python/virtualenv/virtualenv.py
index 655e25cf01..d22207e257 100755
--- a/python/virtualenv/virtualenv.py
+++ b/python/virtualenv/virtualenv.py
@@ -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]