Don't dereference symlinks when copying MacOS frameworks.
This probably isn't the correct way to handle frameworks but it works a
little better than before.
@@ -4,6 +4,7 @@ import sys
import multiprocessing
import platform
import re
+import shutil
import subprocess
import tarfile
import time
@@ -65,8 +66,10 @@ def unpack_sdl2_darwin(env):
download_sdl2_darwin(env)
print(env.subst("Extracting $SDL2_DMG_PATH to $DEPENDANCY_DIR"))
subprocess.check_call(["hdiutil", "mount", env.subst("$SDL2_DMG_PATH")])
- subprocess.check_call(
- ["cp", "-r", "/Volumes/SDL2/SDL2.framework", env.subst("$DEPENDANCY_DIR")]
+ shutil.copytree(
+ "/Volumes/SDL2/SDL2.framework",
+ env.subst("$SDL2_PATH"),
+ symlinks=True,
)
subprocess.check_call(["hdiutil", "unmount", "/Volumes/SDL2"])
