diff options
author | Alberto Sottile <alby128@gmail.com> | 2019-02-22 11:23:48 +0100 |
---|---|---|
committer | Alberto Sottile <alby128@gmail.com> | 2019-02-22 13:52:50 +0000 |
commit | f324cced79a004d6ecb698a01189500384d0f966 (patch) | |
tree | 06ba24052f51728472bad0122c20ee0dbed54318 /sources/shiboken2/libshiboken | |
parent | 4c48e8e53fc566270bb639f09bb2de3d5ddbd5cf (diff) |
Fix error when importing signatures in frozen executables
Attempts to load the module directly from Python if loading it manually from
the .py file fails. This exposes the support submodule to installers. The
loader.py module was also patched to allow direct import from installers.
Change-Id: If225ae7a2e916912a581e09d1a02c18fd3a17526
Fixes: PYSIDE-942
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r-- | sources/shiboken2/libshiboken/signature.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp index da9c56c62..d6c26ac79 100644 --- a/sources/shiboken2/libshiboken/signature.cpp +++ b/sources/shiboken2/libshiboken/signature.cpp @@ -445,8 +445,11 @@ static const char PySide_PythonCode[] = with open(__file__) as _f: exec(compile(_f.read(), __file__, 'exec')) except Exception as e: - print('Exception:', e) - traceback.print_exc(file=sys.stdout) + try: + from shiboken2.support.signature import loader + except: + print('Exception:', e) + traceback.print_exc(file=sys.stdout) globals().update(locals()) )~"; |