summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-04-03 10:28:46 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-04-03 10:52:32 +0200
commit491e458d98a8c13dac031e09d2d5a282091c88b7 (patch)
treea5ff22f7c85e1ba496dd4f9e8cf1f66cd8c6b67b
parent5bf4bd9f100f2ae74325d1d53e2b1b6801cdbb6e (diff)
downloadqtqa-491e458d98a8c13dac031e09d2d5a282091c88b7.tar.gz
testwheel.py: Add designer path from examples passed on cmd line
Pick-to: master Task-number: PYSIDE-2247 Change-Id: Ifeac9d64059fdf9c25f100ef46557fea6e912f8f Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
-rw-r--r--scripts/packagetesting/testwheel.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/packagetesting/testwheel.py b/scripts/packagetesting/testwheel.py
index 8230f2b..c5019ff 100644
--- a/scripts/packagetesting/testwheel.py
+++ b/scripts/packagetesting/testwheel.py
@@ -31,6 +31,9 @@ TOOLS = ["deploy", "genpyi", ("lrelease", "-help"), "lupdate", "metaobjectdump",
VERSION = (0, 0, 0)
+DESIGNER_PATH_VAR = "PYSIDE_DESIGNER_PLUGINS"
+
+
class InstalledWheels(Enum):
Essentials = 0
AddOns = 1
@@ -354,7 +357,17 @@ if __name__ == "__main__":
options = parser.parse_args()
do_pyinst = not options.no_pyinstaller
- root_ex = Path(options.examples) if options.examples else None
+ root_ex = None
+ if options.examples:
+ root_ex = Path(options.examples)
+ # Set path to Qt Designer plugins
+ wiggly_dir = os.fspath(root_ex / 'widgetbinding')
+ taskmenu_dir = os.fspath(root_ex / 'designer' / 'taskmenuextension')
+ new_path = f"{wiggly_dir}:{taskmenu_dir}"
+ designer_path = os.environ.get(DESIGNER_PATH_VAR, "")
+ if designer_path:
+ new_path += f":{designer_path}"
+ os.environ[DESIGNER_PATH_VAR] = new_path
VERSION = get_pyside_version_from_import()
if do_pyinst and sys.version_info[0] < 3: # Note: PyInstaller no longer supports Python 2