marcelotduarte / cx_Freeze

cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any platform that Python itself works on.
https://marcelotduarte.github.io/cx_Freeze/
Other
1.28k stars 210 forks source link

Copying symlink does not work when real source is not relative to parent source #2373

Closed cedk closed 1 month ago

cedk commented 2 months ago

Since 48cbd3dc9d301b6e9ceb64b4488d494597a8425f including Adwaita icons does not work anymore on macOS with Homebrew.

For example in Homebrew the icon /opt/homebrew/share/icons/Adwaita/cursors/bottom_side is a symlink to ../../../../Cellar/adwaita-icon-theme/46.0/share/icons/Adwaita/cursors/bottom_side. With _pre_copy_hook, it is (PosixPath('/Users/ced/tryton-7.2/tryton/build/exe.macosx-14.0-arm64-3.12/share/icons/Adwaita/cursors/bottom_side'), PosixPath('../../../../Cellar/adwaita-icon-theme/46.0/share/icons/Adwaita/cursors/s-resize'), False) that is stored in _symlinks. The symlink target does not exist in the build folder.

I think that if the source symlink is not included it should make a copy.

marcelotduarte commented 1 month ago

Please test with the latest development build: pip install --force --no-cache --pre --extra-index-url https://marcelotduarte.github.io/packages/ cx_Freeze

and give me feedback.

If it does not work, you can resolve the links in the setup. For example, you can change: https://github.com/tryton/tryton/blob/main/tryton/setup-freeze.py#L34 To use realpath or Path.resolve: Path(sys.prefix, 'share', 'icons', 'Adwaita').resolve()

marcelotduarte commented 1 month ago

Release 7.1.0 is out! Documentation

Assuming resolved. If you have any issues, please report them.