aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2019-08-31 19:02:31 +0200
committerChristian Tismer <tismer@stackless.com>2019-09-13 05:43:32 +0200
commit1cc1c93838ddae86ee6c1cacb467a92aac73b9a0 (patch)
treecf0f10f2c1fe84201bf1dc815ce6f63210ca2311
parentfca529c5ed32e8786a98fabbde2f01749130f773 (diff)
Fix Signature after Merging 5.14
Somehow, a few changes had diverged and needed fixing. No idea how this could have passed CI - was it deactivated? This checkin also changes the "*.inc" file names to "_inc.h" in favor of one developer's needs. Change-Id: I0687bc2ba542e07da796b9d0eebc0f16210e8387 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--sources/shiboken2/libshiboken/CMakeLists.txt8
-rw-r--r--sources/shiboken2/libshiboken/embed/embedding_generator.py4
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp4
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py13
-rw-r--r--sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py2
5 files changed, 18 insertions, 13 deletions
diff --git a/sources/shiboken2/libshiboken/CMakeLists.txt b/sources/shiboken2/libshiboken/CMakeLists.txt
index 7cbb22978..0c2c67fe8 100644
--- a/sources/shiboken2/libshiboken/CMakeLists.txt
+++ b/sources/shiboken2/libshiboken/CMakeLists.txt
@@ -30,8 +30,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/embed/signature_bootstrap.py"
"${CMAKE_CURRENT_BINARY_DIR}/embed/signature_bootstrap.py" @ONLY)
add_custom_command(
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embed/signature_bootstrap.inc"
- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embed/signature.inc"
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embed/signature_bootstrap_inc.h"
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embed/signature_inc.h"
COMMAND ${PYTHON_EXECUTABLE} -E
"${CMAKE_CURRENT_SOURCE_DIR}/embed/embedding_generator.py"
--cmake-dir "${CMAKE_CURRENT_BINARY_DIR}/embed"
@@ -62,8 +62,8 @@ pep384impl.cpp
voidptr.cpp
typespec.cpp
bufferprocs_py37.cpp
-embed/signature_bootstrap.inc
-embed/signature.inc
+embed/signature_bootstrap_inc.h
+embed/signature_inc.h
)
get_numpy_location()
diff --git a/sources/shiboken2/libshiboken/embed/embedding_generator.py b/sources/shiboken2/libshiboken/embed/embedding_generator.py
index 77aa5c329..15f63649b 100644
--- a/sources/shiboken2/libshiboken/embed/embedding_generator.py
+++ b/sources/shiboken2/libshiboken/embed/embedding_generator.py
@@ -88,7 +88,7 @@ def create_zipfile(limited_api):
and make a chunked base64 encoded file from it.
"""
zip_name = "signature.zip"
- inc_name = "signature.inc"
+ inc_name = "signature_inc.h"
flag = '-b' if sys.version_info >= (3,) else ''
os.chdir(work_dir)
@@ -131,7 +131,7 @@ def create_zipfile(limited_api):
tmp.close()
# also generate a simple embeddable .pyc file for signature_bootstrap.pyc
boot_name = "signature_bootstrap.py" if limited_api else "signature_bootstrap.pyc"
- with open(boot_name, "rb") as ldr, open("signature_bootstrap.inc", "w") as inc:
+ with open(boot_name, "rb") as ldr, open("signature_bootstrap_inc.h", "w") as inc:
_embed_bytefile(ldr, inc, limited_api)
os.chdir(cur_dir)
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index 543ccac5f..746b026c4 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -455,11 +455,11 @@ GetSignature_Cached(PyObject *props, const char *func_kind, const char *modifier
}
static const char *PySide_CompressedSignaturePackage[] = {
-#include "embed/signature.inc"
+#include "embed/signature_inc.h"
};
static const unsigned char PySide_SignatureLoader[] = {
-#include "embed/signature_bootstrap.inc"
+#include "embed/signature_bootstrap_inc.h"
};
static safe_globals_struc *
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
index b026a5d20..b84a20e16 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
@@ -52,11 +52,6 @@ by producing a lot of clarity.
import sys
from shibokensupport.signature import inspect
from shibokensupport.signature import get_signature
-try:
- from PySide2.QtCore import Qt
- EnumType = type(Qt.Key)
-except ImportError:
- EnumType = None
class ExactEnumerator(object):
@@ -69,6 +64,14 @@ class ExactEnumerator(object):
"""
def __init__(self, formatter, result_type=dict):
+ global EnumType
+ try:
+ # Lazy import
+ from PySide2.QtCore import Qt
+ EnumType = type(Qt.Key)
+ except ImportError:
+ EnumType = None
+
self.fmt = formatter
self.result_type = result_type
self.fmt.level = 0
diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
index d77d34f97..4d673549c 100644
--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py
@@ -264,6 +264,7 @@ type_map = {}
namespace = globals() # our module's __dict__
type_map.update({
+ "...": ellipsis,
"bool": bool,
"char": Char,
"char*": str,
@@ -326,6 +327,7 @@ type_map.update({
"unsigned long": int,
"unsigned short int": int, # 5.6, RHEL 6.6
"unsigned short": int,
+ "Unspecified": None,
"ushort": int,
"void": int, # be more specific?
"WId": WId,