aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-03 13:17:53 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-04 17:02:03 +0100
commite9104aa2097526acfb048206426fc7578b561c4e (patch)
treeb45a0aed1e0be275a3d44873db041b1fd329a2fb /testing
parent349c8188894a3f93df2aaba9289c0c03bf65a148 (diff)
wheel_tester.py: Add Python directory to the PATH
It appears to be missing, causing errors like nuitka not finding patchelf. Pick-to: 6.4 Change-Id: Ie6a5ad948805dd40f26867b35243f75e0b34459f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'testing')
-rw-r--r--testing/wheel_tester.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index 7c99fba90..c21087b4c 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -313,8 +313,13 @@ def run_wheel_tests(install_wheels, wheels_dir_name):
try_install_wheels(wheels_dir, py_version)
log.info("Attempting to build examples.\n")
- try_build_examples()
+ bin_dir = os.fspath(Path(sys.executable).parent)
+ path = os.environ["PATH"]
+ if bin_dir not in path:
+ log.info(f"Adding {bin_dir} to PATH...")
+ os.environ["PATH"] = f"{bin_dir}{os.pathsep}{path}"
+ try_build_examples()
log.info("All tests passed!")