aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/installer_test/hello_app.spec9
-rw-r--r--testing/wheel_tester.py33
2 files changed, 28 insertions, 14 deletions
diff --git a/examples/installer_test/hello_app.spec b/examples/installer_test/hello_app.spec
index d096ab170..84d6d0029 100644
--- a/examples/installer_test/hello_app.spec
+++ b/examples/installer_test/hello_app.spec
@@ -59,7 +59,14 @@ a = Analysis(['hello.py'],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
- excludes=[],
+ # 2019-04-28
+ # This hack circumvents a side effect of Python 2.7.16 which leads to a failure
+ # in 'hook-_tkinter.py'. The error is reported. Until it is fixed, we circumvent
+ # the problem by this exclude.
+ # This effect is triggered by installing 'numpy'. It is somewhat special since
+ # the problem does not show up in Python 3.7 . tkinter would have the same
+ # problem on Python 3.7, but numpy would not trigger it for some reason.
+ excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py
index a6ee2d463..180526b33 100644
--- a/testing/wheel_tester.py
+++ b/testing/wheel_tester.py
@@ -51,6 +51,7 @@ looked up in your PATH.
Make sure that some generated wheels already exist in the dist/
directory (e.g. setup.py bdist_wheel was already executed).
"""
+from __future__ import print_function, absolute_import
import os, sys
@@ -68,7 +69,7 @@ from build_scripts.options import OPTION_CMAKE
from build_scripts.utils import find_files_using_glob
from build_scripts.utils import find_glob_in_path
-from build_scripts.utils import run_process
+from build_scripts.utils import run_process, run_process_output
from build_scripts.utils import rmtree
import distutils.log as log
import platform
@@ -204,6 +205,19 @@ def generate_build_qmake():
log.info("")
+def raise_error_pyinstaller(msg):
+ print()
+ print("PYINST: {msg}".format(**locals()))
+ print("PYINST: sys.version = {}".format(sys.version.splitlines()[0]))
+ print("PYINST: platform.platform() = {}".format(platform.platform()))
+ print("PYINST: See the error message above.")
+ print()
+ for line in run_process_output([sys.executable, "-m", "pip", "list"]):
+ print("PyInstaller pip list: ", line)
+ print()
+ raise(RuntimeError(msg))
+
+
def compile_using_pyinstaller():
src_path = os.path.join("..", "hello.py")
spec_path = os.path.join("..", "hello_app.spec")
@@ -213,14 +227,9 @@ def compile_using_pyinstaller():
# 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.")
- print("PYINST: sys.version = {}".format(sys.version.splitlines()[0]))
- print("PYINST: platform.platform() = {}".format(platform.platform()))
- print("PYINST: See the error message above.")
- return False
+ # 2019-04-28 Raising on error is again enabled
+ raise_error_pyinstaller("Failure while compiling script using PyInstaller.")
log.info("")
- return True
def run_make():
@@ -256,7 +265,7 @@ def run_compiled_script(binary_path):
args = [binary_path]
exit_code = run_process(args)
if exit_code:
- raise RuntimeError("Failure while executing compiled script: {}".format(binary_path))
+ raise_error_pyinstaller("Failure while executing compiled script: {}".format(binary_path))
log.info("")
@@ -293,10 +302,8 @@ def try_build_examples():
src_path = os.path.join(examples_dir, "installer_test")
prepare_build_folder(src_path, "pyinstaller")
- # Currently, there are bugs in the COIN setup.
- # That is currently not the subject of this test:
- if compile_using_pyinstaller():
- run_compiled_script(os.path.join(src_path,
+ compile_using_pyinstaller()
+ run_compiled_script(os.path.join(src_path,
"pyinstaller", "dist", "hello_app", "hello_app"))
log.info("Attempting to build and run samplebinding using cmake.")