diff options
author | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2025-01-21 11:17:07 +0100 |
---|---|---|
committer | Jaime Resano <Jaime.Resano-Aisa@qt.io> | 2025-01-22 22:46:43 +0100 |
commit | 23b7ff61fb899ef8ae305df134d2c0968dce1fa2 (patch) | |
tree | 15f5a0afdf5335b883f531d5824d8994306625b4 /sources/pyside-tools/project.py | |
parent | 30f8707e1c677e3a42a93d1b2b17bd563b9de847 (diff) |
pyside6-deploy: 3. Rename project folder to project_lib
This is a refactor in order to improve the code clarity. In the testing
of the pyside6-project command, importlib.import_module is used to
import the project_lib folder. Currently,
importlib.import_module("project") is ambiguous because it may refer
to both the file and the folder. It chooses the folder over the file.
Task-number: PYSIDE-1612
Pick-to: 6.8
Change-Id: I8903ea9d2112cf2eb7a68d0e302d3c74edcf2c22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/project.py')
-rw-r--r-- | sources/pyside-tools/project.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sources/pyside-tools/project.py b/sources/pyside-tools/project.py index 4836a7472..3b4b3e3f7 100644 --- a/sources/pyside-tools/project.py +++ b/sources/pyside-tools/project.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only from __future__ import annotations - """ Builds a '.pyproject' file @@ -25,12 +24,12 @@ import os from pathlib import Path from argparse import ArgumentParser, RawTextHelpFormatter -from project import (QmlProjectData, check_qml_decorators, is_python_file, - QMLDIR_FILE, MOD_CMD, METATYPES_JSON_SUFFIX, - SHADER_SUFFIXES, TRANSLATION_SUFFIX, - requires_rebuild, run_command, remove_path, - ProjectData, resolve_project_file, new_project, - ProjectType, ClOptions) +from project_lib import (QmlProjectData, check_qml_decorators, is_python_file, + QMLDIR_FILE, MOD_CMD, METATYPES_JSON_SUFFIX, + SHADER_SUFFIXES, TRANSLATION_SUFFIX, + requires_rebuild, run_command, remove_path, + ProjectData, resolve_project_file, new_project, + ProjectType, ClOptions) MODE_HELP = """build Builds the project run Builds the project and runs the first file") @@ -71,6 +70,7 @@ class Project: """ Class to wrap the various operations on Project """ + def __init__(self, project_file: Path): self.project = ProjectData(project_file=project_file) self.cl_options = ClOptions() |