aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-03-18 19:46:47 +0100
committerChristian Tismer <tismer@stackless.com>2020-03-20 01:25:40 +0100
commitfc7f5f15292886790b45ab114d93a873564f95d6 (patch)
treeeb0d660a912ab3491ce446252027b51c9def7dca /testing
parent2e5cdd6bd8e99544fd9370900d30edda2c05c6f9 (diff)
Improve wheel_tester script a bit
Wheel_tester forces installation of "shiboken2_generator". This is not needed for compile_using_pyinstaller, but building modules with cmake. This was not clear. In effect, just the log messages were made a bit more verbose and a clarifying comment was added. Change-Id: I7d7d9ce1e9911461d087d685ab5c1cb66c94aa27 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'testing')
-rw-r--r--testing/wheel_tester.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index 2bf9d7b09..147becdf7 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -121,6 +121,8 @@ def get_examples_dir():
def package_prefix_names():
+ # Note: shiboken2_generator is not needed for compile_using_pyinstaller,
+ # but building modules with cmake needs it.
return ["shiboken2", "shiboken2_generator", "PySide2"]
@@ -159,16 +161,18 @@ def try_install_wheels(wheels_dir, py_version):
log.info("")
for p in package_prefix_names():
- pattern = "{}-*cp{}*.whl".format(p, py_version)
+ log.info("Trying to install {p}:".format(**locals()))
+ pattern = "{}-*cp{}*.whl".format(p, int(float(py_version)))
files = find_files_using_glob(wheels_dir, pattern)
if files and len(files) == 1:
wheel_path = files[0]
install_wheel(wheel_path)
elif len(files) > 1:
- raise RuntimeError("More than one wheel found for specific package and version.")
+ raise RuntimeError("More than one wheel found for specific {p} version."
+ .format(**locals()))
else:
- raise RuntimeError("No wheels compatible with Python {} found "
- "for testing.".format(py_version))
+ raise RuntimeError("No {p} wheels compatible with Python {py_version} found "
+ "for testing.".format(**locals()))
def is_unix():
@@ -329,7 +333,7 @@ def try_build_examples():
def run_wheel_tests(install_wheels):
wheels_dir = get_wheels_dir()
- py_version = sys.version_info[0]
+ py_version = "{v.major}.{v.minor}".format(v=sys.version_info)
if install_wheels:
log.info("Attempting to install wheels.\n")