From 14dbe7e6dbf1eb8f2a04a1148c14fafd75f21872 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 6 Jun 2015 12:45:40 -0700 Subject: [PATCH] Tools: Clean up deploy-mac script symlink resolution --- Tools/deploy-mac.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Tools/deploy-mac.py b/Tools/deploy-mac.py index d566fe7c85..9009c79d1c 100755 --- a/Tools/deploy-mac.py +++ b/Tools/deploy-mac.py @@ -69,15 +69,8 @@ def parseOtoolLine(line, execPath, root): split[:1] = execPath if split[0] == '/' and not os.access(joinPath(split), os.F_OK): split[:1] = root - try: - oldPath = joinPath(split) - while True: - linkPath = os.readlink(os.path.abspath(oldPath)) - oldPath = os.path.join(os.path.dirname(oldPath), linkPath) - except OSError as e: - if e.errno != errno.EINVAL: - raise - split = splitPath(oldPath) + oldPath = os.path.realpath(joinPath(split)) + split = splitPath(oldPath) isFramework = False if not split[-1].endswith('.dylib'): isFramework = True