diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-26 13:10:03 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-26 14:40:15 +0200 |
| commit | d5ec09b3ccc00bb6e1d0999a4c6d076343d91549 (patch) | |
| tree | f4fd9c17989425d6c54e590900dd7b82107dd8cc /sources/pyside-tools/project.py | |
| parent | 569f2a19dd32f6fcab9910cdf38b956e7ca2f39e (diff) | |
pyside6-project: Recognize .pyw files as Python
The suffix .pyw is used for Windows GUI applications.
Pick-to: 6.6 6.5
Fixes: PYSIDE-2471
Change-Id: Ib067e075ea5b76c36a69da0881e224bdf416c45e
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside-tools/project.py')
| -rw-r--r-- | sources/pyside-tools/project.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/pyside-tools/project.py b/sources/pyside-tools/project.py index 003bde319..3dbe42547 100644 --- a/sources/pyside-tools/project.py +++ b/sources/pyside-tools/project.py @@ -25,9 +25,10 @@ from typing import List, Tuple, Optional from pathlib import Path from argparse import ArgumentParser, RawTextHelpFormatter -from project import (QmlProjectData, check_qml_decorators, QMLDIR_FILE, - MOD_CMD, METATYPES_JSON_SUFFIX, requires_rebuild, run_command, - remove_path, ProjectData, resolve_project_file, new_project, +from project import (QmlProjectData, check_qml_decorators, is_python_file, + QMLDIR_FILE, MOD_CMD, METATYPES_JSON_SUFFIX, + requires_rebuild, run_command, remove_path, + ProjectData, resolve_project_file, new_project, ProjectType) MODE_HELP = """build Builds the project @@ -71,7 +72,7 @@ class Project: if not opt_qml_module and not self.project.qml_files: return for file in self.project.files: - if file.suffix == ".py": + if is_python_file(file): has_class, data = check_qml_decorators(file) if has_class: self._qml_module_sources.append(file) |
