aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/shibokenmodule/__init__.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/shibokenmodule/__init__.py.in')
-rw-r--r--sources/shiboken6/shibokenmodule/__init__.py.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/sources/shiboken6/shibokenmodule/__init__.py.in b/sources/shiboken6/shibokenmodule/__init__.py.in
new file mode 100644
index 000000000..e4e978299
--- /dev/null
+++ b/sources/shiboken6/shibokenmodule/__init__.py.in
@@ -0,0 +1,28 @@
+__version__ = "@FINAL_PACKAGE_VERSION@"
+__version_info__ = (@shiboken_MAJOR_VERSION@, @shiboken_MINOR_VERSION@, @shiboken_MICRO_VERSION@, "@shiboken_PRE_RELEASE_VERSION_TYPE@", "@shiboken_PRE_RELEASE_VERSION@")
+
+# PYSIDE-932: Python 2 cannot import 'zipfile' for embedding while being imported, itself.
+# We simply pre-load all imports for the signature extension.
+# 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
+import typing
+
+from .shiboken6 import *
+
+# Trigger signature initialization via __builtins__.
+_init_pyside_extension()