This repository was archived by the owner on May 30, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ cp packaging/cli/install-ouroboros-cli "$CLI_BIN_DIR/install-ouroboros-cli"
9494chmod +x " $CLI_BIN_DIR /ouroboros" " $CLI_BIN_DIR /install-ouroboros-cli"
9595
9696echo " --- Removing Python bytecode caches from app bundle ---"
97- find " $APP_PATH " -name " __pycache__" -type d -prune -exec rm -rf {} +
97+ # PyInstaller may duplicate resource trees with symlinks; remove cache dirs and links before signing.
98+ find " $APP_PATH " -name " __pycache__" -prune -exec rm -rf {} +
9899find " $APP_PATH " -name " *.pyc" -type f -delete
99100
100101if [ " $SIGN_MODE " != " 0" ]; then
Original file line number Diff line number Diff line change @@ -111,6 +111,18 @@ def test_packaged_cli_wrappers_are_copied_before_signing_and_dmg(self):
111111 assert cleanup_pos != - 1 and cleanup_pos < sign_pos
112112 assert dmg_pos != - 1 and wrapper_pos < dmg_pos
113113
114+ def test_pycache_cleanup_includes_symlink_entries_before_signing (self ):
115+ src = _read ("build.sh" )
116+ cleanup_lines = [
117+ line .strip ()
118+ for line in src .splitlines ()
119+ if 'find "$APP_PATH" -name "__pycache__"' in line
120+ ]
121+ assert cleanup_lines
122+ assert all ("-type d" not in line for line in cleanup_lines ), (
123+ "build.sh must remove __pycache__ symlinks as well as directories before codesign"
124+ )
125+
114126 def test_macos_dmg_includes_install_cli_command (self ):
115127 src = _read ("build.sh" )
116128 assert "dmg-stage" in src
You can’t perform that action at this time.
0 commit comments