mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
makewheel: Make sure everything has an ad-hoc code signature
Fixes #927
This commit is contained in:
parent
b817e19ab6
commit
915e079596
@ -404,12 +404,10 @@ class WheelFile(object):
|
|||||||
|
|
||||||
# Now add dependencies. On macOS, fix @loader_path references.
|
# Now add dependencies. On macOS, fix @loader_path references.
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
is_unsigned = subprocess.call(['codesign', '-d', temp.name], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
||||||
if source_path.endswith('deploy-stubw'):
|
if source_path.endswith('deploy-stubw'):
|
||||||
deps_path = '@executable_path/../Frameworks'
|
deps_path = '@executable_path/../Frameworks'
|
||||||
else:
|
else:
|
||||||
deps_path = '@loader_path'
|
deps_path = '@loader_path'
|
||||||
remove_signature = False
|
|
||||||
loader_path = [os.path.dirname(source_path)]
|
loader_path = [os.path.dirname(source_path)]
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
if dep.endswith('/Python'):
|
if dep.endswith('/Python'):
|
||||||
@ -451,17 +449,9 @@ class WheelFile(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
subprocess.call(["install_name_tool", "-change", dep, new_dep, temp.name])
|
subprocess.call(["install_name_tool", "-change", dep, new_dep, temp.name])
|
||||||
remove_signature = True
|
|
||||||
|
|
||||||
# Replace the codesign signature if we modified the library.
|
# Make sure it has an ad-hoc code signature.
|
||||||
if self.platform.endswith("_arm64") and (is_unsigned or remove_signature):
|
|
||||||
subprocess.call(["codesign", "-f", "-s", "-", temp.name])
|
subprocess.call(["codesign", "-f", "-s", "-", temp.name])
|
||||||
elif remove_signature and not is_unsigned:
|
|
||||||
if GetVerbose():
|
|
||||||
print("Removing code signature from {0}".format(source_path))
|
|
||||||
subprocess.call(["codesign", "--remove-signature", temp.name])
|
|
||||||
if self.platform.endswith("_universal2"):
|
|
||||||
subprocess.call(["codesign", "-a", "arm64", "-s", "-", temp.name])
|
|
||||||
else:
|
else:
|
||||||
# On other unixes, we just add dependencies normally.
|
# On other unixes, we just add dependencies normally.
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user