11
0
2024-11-09 19:54:42 +00:00
committed by Git OBS Bridge
6 changed files with 33 additions and 85 deletions

View File

@@ -1,54 +0,0 @@
From e67404e0715d9d6a27e52dbd0be9c34643a89a03 Mon Sep 17 00:00:00 2001
From: Christian Tismer <tismer@stackless.com>
Date: Sun, 13 Oct 2024 23:29:47 +0200
Subject: [PATCH] Lazy Init: Support Lazy Subtypes, amended
The addition of nested types made it necessary to filter
subtypes out of resolveLazyClasses because incarnateType
should be called for toplevel types, only.
Task-number: PYSIDE-2404
Change-Id: I4b95c0f65c055376defb6a8e9ea888285c82a8e2
Fixes: PYSIDE-2888
Pick-to: 6.8
---
sources/shiboken6/libshiboken/sbkmodule.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp
index acadc60..bca7383 100644
--- a/sources/shiboken6/libshiboken/sbkmodule.cpp
+++ b/sources/shiboken6/libshiboken/sbkmodule.cpp
@@ -93,8 +93,10 @@ static void incarnateHelper(PyObject *module, const std::string_view names,
startPos = dotPos + 1;
dotPos = names.find('.', startPos);
}
- // now we have the type to create.
+ // now we have the type to create. (May be done already)
auto funcIter = nameToFunc.find(std::string(names));
+ if (funcIter == nameToFunc.end())
+ return;
// - call this function that returns a PyTypeObject
auto tcStruct = funcIter->second;
auto initFunc = tcStruct.func;
@@ -174,11 +176,15 @@ void resolveLazyClasses(PyObject *module)
// - see if there are still unloaded elements
auto &nameToFunc = tableIter->second;
- // - incarnate all types.
+ // - incarnate all toplevel types. Subtypes will be handled there.
while (!nameToFunc.empty()) {
auto it = nameToFunc.begin();
auto attrNameStr = it->first;
- incarnateType(module, attrNameStr.c_str(), nameToFunc);
+ if (attrNameStr.find('.') == std::string::npos) {
+ incarnateType(module, attrNameStr.c_str(), nameToFunc);
+ } else {
+ nameToFunc.erase(it);
+ }
}
}
--
2.47.0

View File

@@ -18,11 +18,11 @@ Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
sources/pyside6/cmake/Macros/PySideModules.cmake | 9 +++++++++
4 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index 2de089f32..4f57467cb 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -199,10 +199,10 @@ def prepare_packages_posix(pyside_build, _vars, cross_build=False):
Index: pyside-setup-everywhere-src-6.8.0/build_scripts/platforms/unix.py
===================================================================
--- pyside-setup-everywhere-src-6.8.0.orig/build_scripts/platforms/unix.py
+++ pyside-setup-everywhere-src-6.8.0/build_scripts/platforms/unix.py
@@ -199,10 +199,10 @@ def prepare_packages_posix(pyside_build,
# <install>/share/{st_package_name}/glue/* ->
# <setup>/{st_package_name}/glue
@@ -37,11 +37,11 @@ index 2de089f32..4f57467cb 100644
if not is_android:
# <source>/pyside6/{st_package_name}/support/* ->
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index 2d2ff7db0..401930203 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -153,10 +153,9 @@ def prepare_packages_win32(pyside_build, _vars):
Index: pyside-setup-everywhere-src-6.8.0/build_scripts/platforms/windows_desktop.py
===================================================================
--- pyside-setup-everywhere-src-6.8.0.orig/build_scripts/platforms/windows_desktop.py
+++ pyside-setup-everywhere-src-6.8.0/build_scripts/platforms/windows_desktop.py
@@ -153,10 +153,9 @@ def prepare_packages_win32(pyside_build,
# <install>/share/{st_package_name}/glue/* ->
# <setup>/{st_package_name}/glue
@@ -55,10 +55,10 @@ index 2d2ff7db0..401930203 100644
# <source>/pyside6/{st_package_name}/support/* ->
# <setup>/{st_package_name}/support/*
diff --git a/build_scripts/wheel_files.py b/build_scripts/wheel_files.py
index 66e1f4182..9584949da 100644
--- a/build_scripts/wheel_files.py
+++ b/build_scripts/wheel_files.py
Index: pyside-setup-everywhere-src-6.8.0/build_scripts/wheel_files.py
===================================================================
--- pyside-setup-everywhere-src-6.8.0.orig/build_scripts/wheel_files.py
+++ pyside-setup-everywhere-src-6.8.0/build_scripts/wheel_files.py
@@ -59,6 +59,7 @@ class ModuleData:
typesystems: list[str] = field(default_factory=list)
include: list[str] = field(default_factory=list)
@@ -83,10 +83,10 @@ index 66e1f4182..9584949da 100644
def macos_pyside_wrappers_lib(self, s):
if s.startswith("Qt"):
diff --git a/sources/pyside6/cmake/Macros/PySideModules.cmake b/sources/pyside6/cmake/Macros/PySideModules.cmake
index 6e03323dd..57ff5582f 100644
--- a/sources/pyside6/cmake/Macros/PySideModules.cmake
+++ b/sources/pyside6/cmake/Macros/PySideModules.cmake
Index: pyside-setup-everywhere-src-6.8.0/sources/pyside6/cmake/Macros/PySideModules.cmake
===================================================================
--- pyside-setup-everywhere-src-6.8.0.orig/sources/pyside6/cmake/Macros/PySideModules.cmake
+++ pyside-setup-everywhere-src-6.8.0/sources/pyside6/cmake/Macros/PySideModules.cmake
@@ -176,6 +176,14 @@ macro(create_pyside_module)
set(${module_NAME}_glue_dependency ${${module_NAME}_glue})
endif()
@@ -110,6 +110,3 @@ index 6e03323dd..57ff5582f 100644
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_NAME}...")
--
2.47.0

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a1a219a8f327e340d258275fad3a9f261b8f04bc57041747e73dd6ad252b4e1
size 14646216

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c05ad3ae7e7279d6db9dc94a46eb0a05fd093537309f7439c38671bd7255190
size 14641856

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Nov 8 09:58:04 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- Update to 6.8.0.2
- Drop patch, merged upstream:
* 0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch
-------------------------------------------------------------------
Sat Oct 26 21:29:14 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@@ -17,7 +17,7 @@
%define tar_name pyside-setup-everywhere-src
%define short_version 6.8
%define short_version 6.8.0
%global flavor @BUILD_FLAVOR@%{nil}
%if "%flavor" == ""
@@ -43,7 +43,7 @@ ExclusiveArch: donotbuild
%endif
Name: %{mypython}-%{pyside_flavor}
Version: 6.8.0
Version: 6.8.0.2
Release: 0
Summary: Python bindings for Qt 6
License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND GPL-2.0-only AND GPL-3.0-only WITH Qt-GPL-exception-1.0
@@ -53,13 +53,11 @@ Source: https://download.qt.io/official_releases/QtForPython/pyside6/PyS
Patch0: 0001-Always-link-to-python-libraries.patch
# PATCH-FIX-UPSTREAM https://codereview.qt-project.org/c/pyside/pyside-setup/+/567559
Patch1: fix-pytest-qt.patch
# PATCH-FIX-UPSTREAM https://bugreports.qt.io/browse/PYSIDE-2888
Patch2: 0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch
# PATCH-FIX-UPSTREAM
Patch3: 0001-signature-Fix-pointers-to-signature-bytes-with-the-h.patch
Patch2: 0001-signature-Fix-pointers-to-signature-bytes-with-the-h.patch
# PATCH-FIX-UPSTREAM
Patch4: 0001-PySide6-Documentation-Name-the-.rst-doc-files-accord.patch
Patch5: 0001-build-Install-module-doc-snippet-files.patch
Patch3: 0001-PySide6-Documentation-Name-the-.rst-doc-files-accord.patch
Patch4: 0001-build-Install-module-doc-snippet-files.patch
# SECTION common_dependencies
BuildRequires: clang-devel
BuildRequires: %{mypython}-Sphinx