aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2023-11-22 14:54:41 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-11-23 10:01:44 +0000
commitbda1f25e8ebc5ffa990171cd1be0111f2e183d86 (patch)
tree6fb2169aab18cef1faed72d81a761aedb31c2850
parentf82a7dccd3daa1369787400cac4fb52e37490bf9 (diff)
Deployment: Relative path bug fix
- The qml files are identified and stored as relative path and line under consideration tries to do a 'relative_to()' on an absolute path which causes the error ValueError: {qml_file} is not in the subpath of 'project_path' OR one path is relative and the other is absolute. The error only appears on the first run of pyside6-deploy with a project that does not have a .pyproject file. For the subsequent runs, absolute path are used because the path is fetched from the deploy config file. - This patch fixes this error by using absolute path for each qml_file Pick-to: 6.5 Task-number: PYSIDE-1612 Change-Id: Ib54edded404bd1be87ab5f22f61e2d30416b7dae Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit b0de21cea7f01db97a46d72d8edcb7944aaa4387) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/pyside-tools/deploy_lib/nuitka_helper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside-tools/deploy_lib/nuitka_helper.py b/sources/pyside-tools/deploy_lib/nuitka_helper.py
index 69521bfbb..ae3d2ff94 100644
--- a/sources/pyside-tools/deploy_lib/nuitka_helper.py
+++ b/sources/pyside-tools/deploy_lib/nuitka_helper.py
@@ -28,8 +28,9 @@ class Nuitka:
# --include-data-files=ABSOLUTE_PATH_TO_FILE=RELATIVE_PATH_TO ROOT
# for each file. This will preserve the directory structure of QML resources.
qml_args.extend(
- [f"--include-data-files={qml_file}=./{qml_file.relative_to(source_file.parent)}"
- for qml_file in qml_files]
+ [f"--include-data-files={qml_file.resolve()}="
+ f"./{qml_file.resolve().relative_to(source_file.parent)}"
+ for qml_file in qml_files]
)
if excluded_qml_plugins: