summaryrefslogtreecommitdiffstats
path: root/scripts/packagetesting
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-11-21 13:25:26 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-11-21 18:48:14 +0100
commitb167839d8390bbabf548d25357552dde836ccfdf (patch)
tree803352fb11bb0a51a9f5e0422834d284f3a2703c /scripts/packagetesting
parentce196e5663b541be9e19e6a6e99b6a7e5f654699 (diff)
testwheel.py: Adapt to the new examples wheel
The examples directory should now be back and be automatically detected. Still the PYSIDE_DESIGNER_PLUGINS variable needs to be set. Move it to a helper function. Pick-to: master Change-Id: Ibe525d1b62b689f254488df891ed5b149a182fec Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'scripts/packagetesting')
-rw-r--r--scripts/packagetesting/testwheel.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/packagetesting/testwheel.py b/scripts/packagetesting/testwheel.py
index ce36ef16..b4b5a3eb 100644
--- a/scripts/packagetesting/testwheel.py
+++ b/scripts/packagetesting/testwheel.py
@@ -359,6 +359,17 @@ def test_deployment(examples_root):
return result
+def setup_designer_env(examples_root):
+ """Set path to Qt Designer plugin"""
+ wiggly_dir = os.fspath(examples_root / 'widgetbinding')
+ taskmenu_dir = os.fspath(examples_root / 'designer' / 'taskmenuextension')
+ new_path = f"{wiggly_dir}{os.pathsep}{taskmenu_dir}"
+ designer_path = os.environ.get(DESIGNER_PATH_VAR, "")
+ if designer_path:
+ new_path += f"{os.pathsep}{designer_path}"
+ os.environ[DESIGNER_PATH_VAR] = new_path
+
+
if __name__ == "__main__":
parser = ArgumentParser(description='Qt for Python package tester',
formatter_class=RawTextHelpFormatter)
@@ -372,14 +383,6 @@ if __name__ == "__main__":
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}{os.pathsep}{taskmenu_dir}"
- designer_path = os.environ.get(DESIGNER_PATH_VAR, "")
- if designer_path:
- new_path += f"{os.pathsep}{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
@@ -425,6 +428,7 @@ if __name__ == "__main__":
if VERSION >= (6, 1, 0):
print("Launching Qt Designer. Please check the custom widgets.")
+ setup_designer_env(root_ex)
execute([f'pyside{VERSION[0]}-designer'])
if do_pyinst and not test_deployment(root_ex):