Make fix_qt5_rpath.py test harness path discoverable (no hard-coded dev path)#6006
Open
geekrebel wants to merge 1 commit into
Open
Make fix_qt5_rpath.py test harness path discoverable (no hard-coded dev path)#6006geekrebel wants to merge 1 commit into
geekrebel wants to merge 1 commit into
Conversation
small CLI + auto-discovery block so the test harness at the bottom of this file works on any contributor's machine. The previous default was /Users/jonathanthomas/apps/openshot-qt/build/exe.macosx-10.15-x86_64-3.7, which embeds a specific developer's home directory, Python 3.7 (EOL), and the x86_64 architecture. It can only ever resolve correctly on one machine. After this change the script accepts an optional BUILD_PATH argument, and falls back to globbing <repo>/build/exe.macosx-* (cx_Freeze's canonical output pattern) and picking the most recent entry. This works on Apple Silicon and Intel Macs with any Python or macOS SDK version. If no build directory is found it prints a clear usage message and exits non-zero. This also addresses the existing XXX TODO comment on the same block. The functions fix_rpath() and print_min_versions() themselves are unchanged; this only touches the __main__ test harness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
__main__block at the bottom ofinstaller/fix_qt5_rpath.pyhas ahard-coded default:
This path can only resolve on one developer's machine. It embeds:
/Users/jonathanthomas/...),The functions
fix_rpath()andprint_min_versions()themselves are fine,and the production build already invokes them from
freeze.py:571-572witha correct runtime path, so this only affects contributors who want to run
the script directly for testing or post-mortem analysis of a frozen bundle.
This PR replaces the hard-coded line with a small harness:
<repo>/build/exe.macosx-*(the directory patterncx_Freeze produces) and pick the most recent match.
That works on Apple Silicon and Intel Macs, any Python version, and any
macOS SDK. It also addresses the existing
XXX: This path should be set programmatically, somehowTODO comment on the same block.No production code path is changed; this is purely the interactive /
developer-testing harness.
Fourth in a small series of Apple Silicon contributor PRs (following
#6003 label rename, #6004 arch-aware DMG naming, #6005 brew-prefix PATH
in
build-mac-dmg.sh).