[MacOS] Copying Logic2 App using python (copy tree)

Have any one encountered issue with copying Logic2.app using shutil.copytree ?
it seems it follows internal symlinks from: “./Logic2.app/Contents/Frameworks/Electron Framework.framework”

tried with nearly any combination of ignore_dangling_symlinks and follow_symlinks
still doesnt work properly…

P.S, “cp -a …” works properly

@itay.work94 Thanks for the heads up. Can you help describe your reasoning / use case for using shutil.copytree? In parallel, I’ll check with the team here if they have an idea of how to get that working.

This is an interesting problem! I’m not in front of a Mac right now, but I would suggest just using subprocess.run('cp', '-a', '<src>', '<dest>') instead.

If it’s important you get this to work with the stock python commands let me know and I can switch machines and take a look.

Sorry for the trouble!

yeah, done that eventually ):
the thing is once the .app located at some mount point (with incorporated symlinks) that even make things worse (:slight_smile:

Had to just zip it and de-compress after copying (which is another funny story since python ZipFile module doesnt preserve symlinks when decompressing,
Issue 27318: Add support for symlinks to zipfile - Python tracker)

1 Like

basically deploying to offline machine, but we found some solution for now

1 Like