From 035a2991c9468bdaad961da11053cf4176791819 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 12 Jul 2019 10:02:30 +0200 Subject: wheel_tester.py: Add a command line option to disable wheel installation This is useful when testing in a local developer build. Change-Id: Ib875dabd21d437951d3909030b47805b807fac9d Reviewed-by: Christian Tismer --- testing/wheel_tester.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py index 180526b33..535cb3712 100644 --- a/testing/wheel_tester.py +++ b/testing/wheel_tester.py @@ -53,6 +53,7 @@ directory (e.g. setup.py bdist_wheel was already executed). """ from __future__ import print_function, absolute_import +from argparse import ArgumentParser, RawTextHelpFormatter import os, sys try: @@ -327,12 +328,13 @@ def try_build_examples(): run_make() -def run_wheel_tests(): +def run_wheel_tests(install_wheels): wheels_dir = get_wheels_dir() py_version = sys.version_info[0] - log.info("Attempting to install wheels.\n") - try_install_wheels(wheels_dir, py_version) + if install_wheels: + log.info("Attempting to install wheels.\n") + try_install_wheels(wheels_dir, py_version) log.info("Attempting to build examples.\n") try_build_examples() @@ -341,4 +343,10 @@ def run_wheel_tests(): if __name__ == "__main__": - run_wheel_tests() + parser = ArgumentParser(description="wheel_tester", + formatter_class=RawTextHelpFormatter) + parser.add_argument('--no-install-wheels', '-n', action='store_true', + help='Do not install wheels' + ' (for developer builds with virtualenv)') + options = parser.parse_args() + run_wheel_tests(not options.no_install_wheels) -- cgit v1.2.3