Accepting request 1237713 from KDE:Qt6

Update to 6.8.1

OBS-URL: https://build.opensuse.org/request/show/1237713
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python3-pyside6?expand=0&rev=39
This commit is contained in:
2025-01-15 16:42:44 +00:00
committed by Git OBS Bridge
7 changed files with 17 additions and 262 deletions

View File

@@ -1,99 +0,0 @@
From 12aba6c4dfafe191a4640e3ab755a1c7e2ddfc44 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Tue, 15 Oct 2024 08:49:09 +0200
Subject: [PATCH] PySide6/Documentation: Name the .rst doc files according to
the module name
This makes installing them easier.
Amends b55e221464c18053fa44f18132071ebdaee8f432.
Task-number: PYSIDE-2893
Task-number: PYSIDE-1106
Change-Id: Ic93a1db34ca778ba1df8065c87e51e64e01c5900
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
(cherry picked from commit 9214d569d1e0765435a0df6a81a3996b93b3d044)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
sources/pyside6/PySide6/QtQml/typesystem_qml.xml | 16 ++++++++--------
.../doc/{qtqml_functions.rst => qtqml.rst} | 0
2 files changed, 8 insertions(+), 8 deletions(-)
rename sources/pyside6/PySide6/doc/{qtqml_functions.rst => qtqml.rst} (100%)
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
index f2e9707c3..11eb27134 100644
--- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
+++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
@@ -58,42 +58,42 @@
<add-function signature="qmlRegisterType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistertype"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregistertype"/>
<modify-argument index="2" pyi-type="str"/>
</add-function>
<add-function signature="qmlRegisterSingletonType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_callback"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregistersingletontype_qobject_callback"/>
<modify-argument index="2" pyi-type="str"/>
</add-function>
<add-function signature="qmlRegisterSingletonType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qobject_nocallback"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregistersingletontype_qobject_nocallback"/>
<modify-argument index="2" pyi-type="str"/>
</add-function>
<add-function signature="qmlRegisterSingletonType(const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletontype_qjsvalue"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregistersingletontype_qjsvalue"/>
<modify-argument index="1" pyi-type="str"/>
</add-function>
<add-function signature="qmlRegisterSingletonInstance(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,PyObject*@callback@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregistersingletoninstance"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregistersingletoninstance"/>
<modify-argument index="2" pyi-type="str"/>
</add-function>
<add-function signature="qmlRegisterUncreatableType(PyTypeObject@type_obj@,const char*@uri@,int@version_major@,int@version_minor@,const char*@qml_name@,const char*@message@)" return-type="int">
<inject-code class="target" file="../glue/qtqml.cpp" snippet="qmlregisteruncreatabletype"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qmlregisteruncreatabletype"/>
<modify-argument index="2" pyi-type="str"/>
</add-function>
@@ -229,7 +229,7 @@
</modify-argument>
<inject-code class="target" file="../glue/qtqml.cpp"
snippet="qqmlengine-singletoninstance-qmltypeid"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qqmlengine-singletoninstance-qmltypeid"/>
</add-function>
<add-function signature="singletonInstance(QString@uri@,QString@typeName@)"
@@ -241,7 +241,7 @@
</modify-argument>
<inject-code class="target" file="../glue/qtqml.cpp"
snippet="qqmlengine-singletoninstance-typename"/>
- <inject-documentation format="target" mode="append" file="../doc/qtqml_functions.rst"
+ <inject-documentation format="target" mode="append" file="../doc/qtqml.rst"
snippet="qqmlengine-singletoninstance-typename"/>
</add-function>
</object-type>
diff --git a/sources/pyside6/PySide6/doc/qtqml_functions.rst b/sources/pyside6/PySide6/doc/qtqml.rst
similarity index 100%
rename from sources/pyside6/PySide6/doc/qtqml_functions.rst
rename to sources/pyside6/PySide6/doc/qtqml.rst
--
2.47.0

View File

@@ -1,112 +0,0 @@
From cacc9c5803a6dec820dd46211a836453183c8dab Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
Date: Tue, 15 Oct 2024 08:11:46 +0200
Subject: [PATCH] build: Install module doc snippet files
Amends b55e221464c18053fa44f18132071ebdaee8f432.
Task-number: PYSIDE-1106
Fixes: PYSIDE-2893
Change-Id: I4a2688bfb5fcdddc5c6baea49d2fdc9c0f2381f1
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
(cherry picked from commit ad155e67a208d4ac4c20d7033701d6ddb3d2593e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
build_scripts/platforms/unix.py | 8 ++++----
build_scripts/platforms/windows_desktop.py | 7 +++----
build_scripts/wheel_files.py | 3 +++
sources/pyside6/cmake/Macros/PySideModules.cmake | 9 +++++++++
4 files changed, 19 insertions(+), 8 deletions(-)
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
- copydir(
- "{install_dir}/share/{st_package_name}/glue",
- "{st_build_dir}/{st_package_name}/glue",
- _vars=_vars)
+ for glue in ['glue', 'doc']:
+ source = "{install_dir}/share/{st_package_name}/" + glue
+ target = "{st_build_dir}/{st_package_name}/" + glue
+ copydir(source, target, _vars=_vars)
if not is_android:
# <source>/pyside6/{st_package_name}/support/* ->
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
- copydir(
- "{install_dir}/share/{st_package_name}/glue",
- destination_dir / "glue",
- _vars=_vars)
+ for glue in ['glue', 'doc']:
+ source = "{install_dir}/share/{st_package_name}/" + glue
+ copydir(source, destination_dir / glue, _vars=_vars)
# <source>/pyside6/{st_package_name}/support/* ->
# <setup>/{st_package_name}/support/*
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)
glue: list[str] = field(default_factory=list)
+ doc_glue: list[str] = field(default_factory=list)
metatypes: list[str] = field(default_factory=list)
plugins: list[str] = field(default_factory=list)
@@ -87,6 +88,7 @@ class ModuleData:
self.typesystems.append(f"typesystem_{_lo}.xml")
self.include.append(f"Qt{self.name}/*.h")
self.glue.append(f"qt{_lo}.cpp")
+ self.doc_glue.append(f"qt{_lo}.rst")
if not len(self.metatypes):
self.metatypes.append(f"qt6{_lo}_relwithdebinfo_metatypes.json")
@@ -122,6 +124,7 @@ class ModuleData:
self.typesystems = [f"typesystems/{i}" for i in self.typesystems]
self.include = [f"include/{i}" for i in self.include]
self.glue = [f"glue/{i}" for i in self.glue]
+ self.doc_glue = [f"doc/{i}" for i in self.doc_glue]
def macos_pyside_wrappers_lib(self, s):
if s.startswith("Qt"):
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()
+ # Install module doc files.
+ set(${module_NAME}_doc "${CMAKE_CURRENT_SOURCE_DIR}/../doc/${lower_module_name}.rst")
+ set(${module_name}_doc_dependency "")
+ if(EXISTS ${${module_NAME}_doc})
+ install(FILES ${${module_NAME}_doc} DESTINATION share/PySide6${pyside6_SUFFIX}/doc)
+ set(${module_NAME}_doc_dependency ${${module_NAME}_doc})
+ endif()
+
# Install standalone glue files into typesystems subfolder, so that the resolved relative
# paths remain correct.
if (module_GLUE_SOURCES)
@@ -245,6 +253,7 @@ macro(create_pyside_module)
DEPENDS ${total_type_system_files}
${module_GLUE_SOURCES}
${${module_NAME}_glue_dependency}
+ ${${module_NAME}_doc_dependency}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_NAME}...")

View File

@@ -1,32 +0,0 @@
From 7911d19e7cd8479c3b3098848ba1627e7de91f29 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Mon, 14 Oct 2024 13:09:41 +0200
Subject: [PATCH] signature: Fix pointers to signature bytes with the highest
bit set
If a pointer to signature bytes has the highest bit set (e.g. 0xf6dd2840 on
32bit), it is interpreted as negative Py_ssize_t value by Py_BuildValue.
PyLong_AsSize_t cannot convert this into size_t and returns -1, resulting
in an invalid pointer.
To avoid this, use PyLong_AsSsize_t and intptr_t instead.
---
sources/shiboken6/libshiboken/signature/signature.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/shiboken6/libshiboken/signature/signature.cpp b/sources/shiboken6/libshiboken/signature/signature.cpp
index e69de193f13b..09d4120bf002 100644
--- a/sources/shiboken6/libshiboken/signature/signature.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature.cpp
@@ -435,7 +435,7 @@ PyObject *PySide_BuildSignatureProps(PyObject *type_key)
if (PyTuple_Check(numkey)) {
PyObject *obAddress = PyTuple_GetItem(numkey, 0);
PyObject *obSize = PyTuple_GetItem(numkey, 1);
- const size_t addr = PyLong_AsSize_t(obAddress);
+ const intptr_t addr = PyLong_AsSsize_t(obAddress);
const Py_ssize_t size = PyLong_AsSsize_t(obSize);
const char **cstrings = bytesToStrings(reinterpret_cast<const uint8_t *>(addr), size);
if (cstrings == nullptr)
--
2.47.0

View File

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

BIN
pyside-setup-everywhere-src-6.8.1.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jan 14 09:31:54 UTC 2025 - Christophe Marin <christophe@krop.fr>
- Update to 6.8.1.1. Check the installed changes-6.8.1 file for the
full list of changes
- Drop patches, merged upstream:
* 0001-PySide6-Documentation-Name-the-.rst-doc-files-accord.patch
* 0001-build-Install-module-doc-snippet-files.patch
- Drop 0001-signature-Fix-pointers-to-signature-bytes-with-the-h.patch
-------------------------------------------------------------------
Fri Nov 8 09:58:04 UTC 2024 - Nico Krapp <nico.krapp@suse.com>

View File

@@ -17,7 +17,7 @@
%define tar_name pyside-setup-everywhere-src
%define short_version 6.8.0
%define tar_version 6.8.1.1
%global flavor @BUILD_FLAVOR@%{nil}
%if "%flavor" == ""
@@ -43,21 +43,16 @@ ExclusiveArch: donotbuild
%endif
Name: %{mypython}-%{pyside_flavor}
Version: 6.8.0.2
Version: 6.8.1
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
URL: https://www.qt.io
Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{short_version}.tar.xz
Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{tar_version}.tar.xz
# PATCH-FIX-OPENSUSE
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
Patch2: 0001-signature-Fix-pointers-to-signature-bytes-with-the-h.patch
# PATCH-FIX-UPSTREAM
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
@@ -76,10 +71,7 @@ BuildRequires: pkgconfig(libxslt)
# /SECTION
%if "%{pyside_flavor}" == "pyside6"
# For the registry_existence test
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150500
# Not available in 15.5
BuildRequires: %{mypython}-distro
%endif
BuildRequires: %{mypython}-shiboken6-devel = %{version}
# SECTION test_dependencies
BuildRequires: Mesa-dri
@@ -169,7 +161,7 @@ Obsoletes: python3-%{pyside_flavor}-devel < %{version}-%{release}
Python bindings for the Qt cross-platform application and UI framework
%prep
%autosetup -p1 -n %{tar_name}-%{short_version}
%autosetup -p1 -n %{tar_name}-%{version}
# Restore 6.6.1 RPATH value. rpmlint will complain otherwise
sed -i 's#${base}/../shiboken6/##' sources/pyside6/CMakeLists.txt
@@ -270,10 +262,6 @@ ctest_exclude_regex="QtWebEngineWidgets_pyside-474-qtwebengineview|QtGui_qpen_te
%ifarch aarch64
ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme|QtWebEngineCore_qwebenginecookiestore_test|pysidetest_new_inherited_functions_test|QtWidgets_bug_668|QtWidgets_bug_728"
%endif
# python311-distro is unavailable in 15.5, skip registry_existence_test
%if 0%{?sle_version} == 150500
ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test"
%endif
%endif
pushd sources/%{pyside_flavor}