48 with open(fname)
as f:
49 o = subprocess.Popen([
'otool',
'-L', fname], stdout=subprocess.PIPE)
52 library = line.split(
' ', 1)[0][1:]
53 if library.startswith(
"/usr/local/lib")
or library.startswith(
"/usr/local/opt")
or library.startswith(
"/Users/"):
54 if (os.path.basename(library) != os.path.basename(fname)):
55 command =
"install_name_tool -change " + \
56 library +
" @executable_path/./" + \
57 os.path.basename(library) +
" " + fname
59 os.system(
"chmod +w " + fname)
63 for (dirpath, dirnames, filenames)
in os.walk(root):
64 for filename
in filenames:
def readDependencies(fname)