aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside-tools/deploy_lib/default.spec1
-rw-r--r--sources/pyside-tools/deploy_lib/dependency_util.py30
2 files changed, 21 insertions, 10 deletions
diff --git a/sources/pyside-tools/deploy_lib/default.spec b/sources/pyside-tools/deploy_lib/default.spec
index 214c91dc4..56c8dadf6 100644
--- a/sources/pyside-tools/deploy_lib/default.spec
+++ b/sources/pyside-tools/deploy_lib/default.spec
@@ -33,6 +33,7 @@ android_packages = buildozer==1.5.0,cython==0.29.33
# Paths to required QML files. Comma separated
# Normally all the QML files required by the project are added automatically
+# Design Studio projects include the QML files using Qt resources
qml_files =
# Excluded qml plugin binaries
diff --git a/sources/pyside-tools/deploy_lib/dependency_util.py b/sources/pyside-tools/deploy_lib/dependency_util.py
index 6bdfb20b7..63b40060a 100644
--- a/sources/pyside-tools/deploy_lib/dependency_util.py
+++ b/sources/pyside-tools/deploy_lib/dependency_util.py
@@ -30,15 +30,25 @@ def get_py_files(project_dir: Path, extra_ignore_dirs: tuple[Path] = None, proje
qrc_candidates = project_data.qrc_files
def add_uic_qrc_candidates(candidates, candidate_type):
- possible_py_candidates = [(file.parent / f"{candidate_type}_{file.stem}.py")
- for file in candidates
- if (file.parent / f"{candidate_type}_{file.stem}.py").exists()
- ]
-
- if len(possible_py_candidates) != len(candidates):
- warnings.warn(f"[DEPLOY] The number of {candidate_type} files and their "
- "corresponding Python files don't match.",
- category=RuntimeWarning)
+ possible_py_candidates = []
+ missing_files = []
+ for file in candidates:
+ py_file = file.parent / f"{candidate_type}_{file.stem}.py"
+ if py_file.exists():
+ possible_py_candidates.append(py_file)
+ else:
+ missing_files.append((str(file), str(py_file)))
+
+ if missing_files:
+ missing_details = "\n".join(
+ f"{candidate_type.upper()} file: {src} -> Missing Python file: {dst}"
+ for src, dst in missing_files
+ )
+ warnings.warn(
+ f"[DEPLOY] The following {candidate_type} files do not have corresponding "
+ f"Python files:\n {missing_details}",
+ category=RuntimeWarning
+ )
py_candidates.extend(possible_py_candidates)
@@ -46,7 +56,7 @@ def get_py_files(project_dir: Path, extra_ignore_dirs: tuple[Path] = None, proje
add_uic_qrc_candidates(ui_candidates, "ui")
if qrc_candidates:
- add_uic_qrc_candidates(qrc_candidates, "qrc")
+ add_uic_qrc_candidates(qrc_candidates, "rc")
return py_candidates