diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-09-10 07:55:41 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-09-10 08:57:18 +0200 |
| commit | 8acc7f3e52444e34dfaff5e38b1fb75e046a434b (patch) | |
| tree | aa3ea162d526cdfd5c1c1026c67944be28aec2a9 /sources/pyside-tools | |
| parent | ffea69fcf1a158213feed2a3ce049b78c49f4aa5 (diff) | |
pyside6-project: Fix lupdate handling with subdirectories
Pass paths relative to the project directory instead of the file
name to lupdate (to keep the command line short).
Fixes: PYSIDE-2861
Pick-to: 6.7 6.5
Change-Id: Iebdc5e9e6e5c50952b6db4425a68179045cbf9fc
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside-tools')
| -rw-r--r-- | sources/pyside-tools/project.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside-tools/project.py b/sources/pyside-tools/project.py index 3821c5f2e..4836a7472 100644 --- a/sources/pyside-tools/project.py +++ b/sources/pyside-tools/project.py @@ -243,13 +243,14 @@ class Project: return source_files = self.project.python_files + self.project.ui_files - cmd_prefix = [LUPDATE_CMD] + [p.name for p in source_files] + project_dir = self.project.project_file.parent + cmd_prefix = [LUPDATE_CMD] + [os.fspath(p.relative_to(project_dir)) for p in source_files] cmd_prefix.append("-ts") for ts_file in self.project.ts_files: if requires_rebuild(source_files, ts_file): cmd = cmd_prefix cmd.append(ts_file.name) - run_command(cmd, cwd=self.project.project_file.parent) + run_command(cmd, cwd=project_dir) if __name__ == "__main__": |
