From 8f74adea7cffdf2e1158df15ba0105dc40b24fa3 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Tue, 23 Apr 2019 15:00:34 +0200 Subject: Provide a spec file for hello.app used by wheel_tester The PyInstaller test was done with minimalistic options to keep things as simple as possible. This had the side effect that on certain Python versions and platforms things were touched that created errors, although those things were nowhere in use. It turned out that the generated hello_app.spec file contains the result of an in-depth analysis which touches so many non-existing modules. When using just the generated spec file and no other option, the analysis is almost skipped and the generation of an executable avoids further problems and is faster. This patch removes all arguments and uses a spec file instead. The arguments are kept in a comment, just in case. Change-Id: I17c43a588bc6f95f62fc3104a047dc08e8d8e70d Reviewed-by: Friedemann Kleint Reviewed-by: Cristian Maureira-Fredes --- testing/wheel_tester.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'testing') diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py index 810ef0f56..a6ee2d463 100644 --- a/testing/wheel_tester.py +++ b/testing/wheel_tester.py @@ -206,9 +206,12 @@ def generate_build_qmake(): def compile_using_pyinstaller(): src_path = os.path.join("..", "hello.py") - exit_code = run_process([sys.executable, "-m", "PyInstaller", - "--name=hello_app", "--console", "--log-level=DEBUG", - src_path]) + spec_path = os.path.join("..", "hello_app.spec") + exit_code = run_process([sys.executable, "-m", "PyInstaller", spec_path]) + # to create the spec file, this setting was used: + #"--name=hello_app", "--console", "--log-level=DEBUG", src_path]) + # By using a spec file, we avoid all the probing that might disturb certain + # platforms and also save some analysis time. if exit_code: # raise RuntimeError("Failure while compiling script using PyInstaller.") print("PYINST: Failure while compiling script using PyInstaller.") -- cgit v1.2.3