diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-11-22 14:54:41 +0100 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2023-11-23 08:47:02 +0000 |
commit | b0de21cea7f01db97a46d72d8edcb7944aaa4387 (patch) | |
tree | f2b6b805ae85a74c3f72038fe5fe8f856d0fe2a6 /sources | |
parent | 174559981eebbfe217163d15a10b41ac4f207b25 (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.6 6.5
Task-number: PYSIDE-1612
Change-Id: Ib54edded404bd1be87ab5f22f61e2d30416b7dae
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside-tools/deploy_lib/nuitka_helper.py | 5 |
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: |