PyInstaller spec: collect assets/UI recursively (bundles built from master fail at startup) - #2553
Open
ThomasWaldmann wants to merge 1 commit into
Open
PyInstaller spec: collect assets/UI recursively (bundles built from master fail at startup)#2553ThomasWaldmann wants to merge 1 commit into
ThomasWaldmann wants to merge 1 commit into
Conversation
The dialogs' .ui files moved to assets/UI/dialogs/{,archive,profile,repo}/,
but the spec still collected them with the glob `assets/UI/*`. PyInstaller
walks a matched directory relative to that directory, so
assets/UI/dialogs/exception.ui ended up as assets/UI/exception.ui and a
bundle built from master failed at startup:
FileNotFoundError: .../Contents/Frameworks/assets/UI/dialogs/exception.ui
Pass the directory instead of a glob; PyInstaller then keeps the layout.
Co-Authored-By: Claude Fable 5.1 <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.
Description
The dialogs'
.uifiles live insrc/vorta/assets/UI/dialogs/{,archive,profile,repo}/now, butpackage/vorta.specstill collects them with the globassets/UI/*. When a glob match is a directory, PyInstaller walks it relative to the matched directory, soassets/UI/dialogs/exception.uiis copied toassets/UI/exception.ui— thedialogs/level is dropped. A bundle built frommastertherefore dies on the firstuic.loadUiTypewith a subfolder path:Passing the directory itself instead of a glob makes PyInstaller collect it recursively with the layout intact (that is the documented form for directories). The other
datasentries point at flat directories and are unchanged.Related Issue
Found while building the app locally for #2551. No separate issue;
make dist/Vorta.appfrommastercurrently produces an app that cannot start.Motivation and Context
Release builds from the current tree need this; it only touches the packaging spec.
How Has This Been Tested?
pyinstaller --clean --noconfirm package/vorta.spec(macOS 15, Python 3.11, PyQt6 6.6.1, PyInstaller 6.11), copiedSparkle.frameworkin as the Makefile does, launched under a scratch$HOME: the app starts and runs; before the change it exited at startup with the error above..uifiles, includingassets/UI/dialogs/**, are present in the built bundle at their original relative paths.Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.
🤖 Generated with Claude Code