From fc7f5f15292886790b45ab114d93a873564f95d6 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Wed, 18 Mar 2020 19:46:47 +0100 Subject: 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 --- testing/wheel_tester.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'testing') 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") -- cgit v1.2.3