aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/shibokenmodule
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/shibokenmodule')
-rw-r--r--sources/shiboken2/shibokenmodule/__init__.py.in21
1 files changed, 20 insertions, 1 deletions
diff --git a/sources/shiboken2/shibokenmodule/__init__.py.in b/sources/shiboken2/shibokenmodule/__init__.py.in
index 066fd3584..ed6ce5623 100644
--- a/sources/shiboken2/shibokenmodule/__init__.py.in
+++ b/sources/shiboken2/shibokenmodule/__init__.py.in
@@ -3,7 +3,26 @@ __version_info__ = (@shiboken_MAJOR_VERSION@, @shiboken_MINOR_VERSION@, @shiboke
# PYSIDE-932: Python 2 cannot import 'zipfile' for embedding while being imported, itself.
# We simply pre-load all imports for the signature extension.
-import sys, zipfile, base64, marshal, io, contextlib
+# Also, PyInstaller seems not always to be reliable in finding modules.
+# We explicitly import everything that is needed:
+import sys
+import os
+import zipfile
+import base64
+import marshal
+import io
+import contextlib
+import textwrap
+import traceback
+import types
+import struct
+import re
+import tempfile
+import keyword
+import functools
+if sys.version_info[0] == 3:
+ # PyInstaller seems to sometimes fail:
+ import typing
from .shiboken2 import *