Added a changelog that is required in order to submit this to SLFO

(I wrote the changelog looking at a diff between 6.8.0 and 6.8.0.2)

  - Support lazy nested types.
  - Provide __all__ only on demand.
  - Handle correctly callback dynamic slots that fail.
  - Small fixes.

OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/python3-pyside6?expand=0&rev=90
This commit is contained in:
Christophe Marin 2024-11-14 08:10:32 +00:00 committed by Git OBS Bridge
commit 2b90227d1d
16 changed files with 1115 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,34 @@
From e9591e27db4ae3412d4504a69a8afebee9a1b83e Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Tue, 27 Jul 2021 14:54:00 +0200
Subject: [PATCH] Always link to python libraries.
Change-Id: I687191431adaff55927de353db8f81dfa30ba1b1
---
sources/shiboken6/cmake/ShibokenHelpers.cmake | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sources/shiboken6/cmake/ShibokenHelpers.cmake b/sources/shiboken6/cmake/ShibokenHelpers.cmake
index 27ee333..4be2ad1 100644
--- a/sources/shiboken6/cmake/ShibokenHelpers.cmake
+++ b/sources/shiboken6/cmake/ShibokenHelpers.cmake
@@ -425,13 +425,9 @@ macro(shiboken_compute_python_libraries)
"SHIBOKEN_COMPUTE_LIBS" "shiboken_compute_python_libraries"
"IS_CALLED_FROM_EXPORT" "" "" ${ARGN})
- if (NOT SHIBOKEN_PYTHON_LIBRARIES)
- set(SHIBOKEN_PYTHON_LIBRARIES "")
- endif()
-
- if(WIN32 AND NOT SHIBOKEN_PYTHON_LIBRARIES)
- set(SHIBOKEN_PYTHON_LIBRARIES ${Python_LIBRARIES})
- endif()
+ # Always link to python libraries.
+ message(STATUS "Linking shiboken to ${Python_LIBRARIES}")
+ set(SHIBOKEN_PYTHON_LIBRARIES ${Python_LIBRARIES})
# If the resulting variable
# contains a "debug;X;optimized;Y" list like described in shiboken_check_if_limited_api,
--
2.46.1

View File

@ -0,0 +1,54 @@
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

@ -0,0 +1,99 @@
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

@ -0,0 +1,112 @@
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

@ -0,0 +1,32 @@
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

25
_constraints Normal file
View File

@ -0,0 +1,25 @@
<constraints>
<overwrite>
<conditions>
<package>python3-pyside6:shiboken6</package>
</conditions>
<hardware>
<disk>
<size unit="G">4</size>
</disk>
</hardware>
</overwrite>
<overwrite>
<conditions>
<package>python3-pyside6:pyside6</package>
</conditions>
<hardware>
<disk>
<size unit="G">7</size>
</disk>
<memory>
<size unit="G">6</size>
</memory>
</hardware>
</overwrite>
</constraints>

5
_multibuild Normal file
View File

@ -0,0 +1,5 @@
<multibuild>
<flavor>pyside6</flavor>
<flavor>shiboken6</flavor>
</multibuild>

41
fix-pytest-qt.patch Normal file
View File

@ -0,0 +1,41 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Fix for pytest-qt test_destroyed failure
This fixes the issue in the python-pytest-qt package (test-pyside6 flavor)
that triggered the following failure:
[ 90s] ________________________________ test_destroyed ________________________________
[ 90s] CALL ERROR: Exceptions caught in Qt event loop:
[ 90s] ________________________________________________________________________________
[ 90s] RuntimeError: Internal C++ object (Obj) already deleted.
[ 90s]
[ 90s] The above exception was the direct cause of the following exception:
[ 90s]
[ 90s] Traceback (most recent call last):
[ 90s] File "/usr/lib/python3.11/site-packages/pytestqt/wait_signal.py", line 219, in _quit_loop_by_signal
[ 90s] self._cleanup()
[ 90s] File "/usr/lib/python3.11/site-packages/pytestqt/wait_signal.py", line 226, in _cleanup
[ 90s] _silent_disconnect(signal, self._quit_loop_by_signal)
[ 90s] File "/usr/lib/python3.11/site-packages/pytestqt/wait_signal.py", line 741, in _silent_disconnect
[ 90s] signal.disconnect(slot)
[ 90s] SystemError: <class 'RuntimeError'> returned a result with an exception set
This happened because PyObject_CallObject (or PyObject_GetAttr) was
setting an exception and warnDisconnectFailed was generating a new one
without the first one being processed yet.
Submitted to upstream in https://codereview.qt-project.org/c/pyside/pyside-setup/+/567559
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
index 13d95fa..228f1e3 100644
--- a/sources/pyside6/libpyside/pysidesignal.cpp
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -715,7 +715,7 @@ static PyObject *signalInstanceDisconnect(PyObject *self, PyObject *args)
Shiboken::AutoDecRef pyMethod(PyObject_GetAttr(source->d->source,
PySide::PySideName::qtDisconnect()));
PyObject *result = PyObject_CallObject(pyMethod, tupleArgs);
- if (result != Py_True)
+ if (result && result != Py_True)
warnDisconnectFailed(slot, source->d->signature);
return result;
}

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

Binary file not shown.

View File

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

View File

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

View File

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

352
python3-pyside6.changes Normal file
View File

@ -0,0 +1,352 @@
-------------------------------------------------------------------
Fri Nov 8 09:58:04 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- Update to 6.8.0.2
- Support lazy nested types.
- Provide __all__ only on demand.
- Handle correctly callback dynamic slots that fail.
- Small fixes.
- 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>
- Add patches to fix issue found by the KDE CI (PYSIDE-2893)
* 0001-PySide6-Documentation-Name-the-.rst-doc-files-accord.patch
* 0001-build-Install-module-doc-snippet-files.patch
-------------------------------------------------------------------
Mon Oct 14 11:35:35 UTC 2024 - Fabian Vogt <fvogt@suse.com>
- Add patch to fix shiboken on 32bit platforms:
* 0001-signature-Fix-pointers-to-signature-bytes-with-the-h.patch
-------------------------------------------------------------------
Mon Oct 14 06:45:34 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Add upstream change:
* 0001-Lazy-Init-Support-Lazy-Subtypes-amended.patch
-------------------------------------------------------------------
Thu Oct 10 20:20:00 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.8.0. Check the installed changes-6.8.0 file for the
full list of changes
-------------------------------------------------------------------
Sat Sep 28 08:37:04 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.7.3. Check the installed changes-6.7.3 file for the
full list of changes
-------------------------------------------------------------------
Thu Sep 5 19:17:03 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Tumbleweed now has numpy2: Fix include path
-------------------------------------------------------------------
Wed Jun 19 07:48:28 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.7.2. Check the installed changes-6.7.2 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-shiboken-add-missing-include.patch
-------------------------------------------------------------------
Wed May 29 07:28:11 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Add patch to fix build of python-pytest-qt with test-pyside6
flavor, which fails the test_destroyed test with a SystemError
exception:
* fix-pytest-qt.patch
-------------------------------------------------------------------
Tue May 28 15:46:43 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update build constraints
-------------------------------------------------------------------
Fri May 24 11:22:44 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.7.1. Check the installed changes-6.7.1 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-Multimedia-Adapt-to-revert-of-QAudio-QtAudio-namespa.patch
- Add upstream build fix:
* 0001-shiboken-add-missing-include.patch
-------------------------------------------------------------------
Tue Apr 9 11:46:05 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Add upstream change:
* 0001-Multimedia-Adapt-to-revert-of-QAudio-QtAudio-namespa.patch
-------------------------------------------------------------------
Mon Apr 8 08:50:25 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Use a git snapshot to fix build with Qt 6.7 until a new release
is available
-------------------------------------------------------------------
Wed Mar 27 08:26:57 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Exclude a broken pyside test since Qt 6.6.3 release
-------------------------------------------------------------------
Sat Feb 17 17:52:19 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Update to 6.6.2. Check the installed changes-6.6.2 file for the
full list of changes
- Rebase 0001-Always-link-to-python-libraries.patch
-------------------------------------------------------------------
Fri Jan 26 12:07:41 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Enable SLE15 python module for a more modern python than 3.6
- Use primary_python flavor for Tumbleweed (which provides python3)
-------------------------------------------------------------------
Thu Dec 7 10:54:43 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.6.1. Check the installed changes-6.6.1 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-Fix-QtAsyncio-install-dir.patch
-------------------------------------------------------------------
Tue Oct 17 10:35:38 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.6.0. Check the installed changes-6.6.0 file for the
full list of changes
- Drop patches, merged upstream:
* 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch
* 0001-adapt-qC_Debug_Info_Warning_Critical_-for-new-definition.patch
- Add patch:
* 0001-Fix-QtAsyncio-install-dir.patch
-------------------------------------------------------------------
Wed Oct 4 09:00:16 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
- Add patch from upstream to fix a build failure:
* 0001-adapt-qC_Debug_Info_Warning_Critical_-for-new-definition.patch
-------------------------------------------------------------------
Mon Sep 18 12:54:20 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Add patch to fix failure with Python 3.11.5:
* 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch
-------------------------------------------------------------------
Wed Jul 26 10:48:26 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.5.2. Check the installed changes-6.5.2 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-CMake-Fix-installation-of-pyi-files.patch
-------------------------------------------------------------------
Tue May 30 08:23:43 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.5.1. Check the installed changes-6.5.1 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-Fix-build-when-using-QT_FEATURE_opengles2.patch
- Add patch:
* 0001-CMake-Fix-installation-of-pyi-files.patch
-------------------------------------------------------------------
Mon Apr 24 09:45:54 UTC 2023 - Frederic Crozat <fcrozat@suse.com>
- Generate egg-info.
-------------------------------------------------------------------
Sat Apr 22 08:38:24 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Add patch to fix build on arm (boo#1210723):
* 0001-Fix-build-when-using-QT_FEATURE_opengles2.patch
-------------------------------------------------------------------
Tue Apr 4 23:22:25 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.5.0. Check the installed changes-6.5.0 file for the
full list of changes
- Drop patch, merged upstream:
* 0001-Don-t-install-CMake-files-into-versioned-directories.patch
- Build pyside with llvm15 on Tumbleweed to work around
boo#1210176 / https://bugreports.qt.io/browse/PYSIDE-2268
-------------------------------------------------------------------
Fri Mar 17 09:04:56 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Temporarily disable Qt3D bindings on x86
-------------------------------------------------------------------
Wed Jan 11 11:11:25 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 6.4.2. Check the installed changes-6.4.2 file for the
full list of changes
- Drop patches, merged upstream:
* 0001-Fix-a-cmake-only-build.patch
* 0002-Fix-a-cmake-only-build-amended.patch
-------------------------------------------------------------------
Tue Dec 6 07:34:22 UTC 2022 - Christophe Marin <christophe@krop.fr>
- Disable two additional tests on aarch64
-------------------------------------------------------------------
Thu Nov 24 08:14:56 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.4.1. Check the installed changes-6.4.1 file for the
full list of changes
* The long missing support for __slots__ was finally added
* Documentation builds have been fixed to work with
system-installed versions of Qt 6.
* A bug when passing wrong keyword args to signals has been fixed
* The build with OpenGLES has been fixed
* Crashes when not implementing abstract methods have been
fixed
* Python 3.10 and higher are not compatible to the
__signature__ attribute. This has been fixed by a temporary
patch until the final removal of that attribute.
- Drop patch, merged upstream:
* pyside-6.4.0-arm_gles.patch
- Add patches to fix CMake builds:
* 0001-Fix-a-cmake-only-build.patch
* 0002-Fix-a-cmake-only-build-amended.patch
-------------------------------------------------------------------
Sun Oct 16 07:04:40 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.4.0. Check the installed changes-6.4.0 file for the
full list of changes
* Modules QtPdf, QtPdfWidgets and QtSpatialAudio have been added
* The Qt5Compat QML imports have been added (QtGraphicalEffects)
* Errors message about test-configuring projects with cmake
have been improved
* The feature module has been improved by a reset function
* The documentation build process has been improved; it no
longer requires a complete PySide6 build
* Support for Python 3.11 has been added
- Drop patch, fixed upstream
* 0001-Adapt-to-Qt-6.4.patch
- Fix the shiboken constraints
- Add patch to fix build failures on ARM:
* pyside-6.4.0-arm_gles.patch
-------------------------------------------------------------------
Fri Sep 30 20:54:07 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Add Qt 6.4 compatibility patch:
* 0001-Adapt-to-Qt-6.4.patch
- Add QtQuick3D and QtSpeech bindings
- Disable a failing test when building with Qt 6.4
-------------------------------------------------------------------
Tue Sep 13 06:51:16 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.3.2. Check the installed changes-6.3.2 file for the
complete list of changes.
-------------------------------------------------------------------
Sat Aug 6 09:27:06 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Use CMAKE_SKIP_RPATH when building python3-shiboken6 to avoid
non-existent RUNPATH entries in the library.
-------------------------------------------------------------------
Sun Jun 19 19:11:09 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.3.1. Check the installed changes-6.3.1 file for the
complete list of changes.
- Drop patch, fixed upstream:
* 0001-Work-around-build-issue-in-pyside-6.3.patch
-------------------------------------------------------------------
Sun Apr 17 13:25:54 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Add patch to fix build:
* 0001-Work-around-build-issue-in-pyside-6.3.patch
- Rebase patch:
* 0001-Don-t-install-CMake-files-into-versioned-directories.patch
-------------------------------------------------------------------
Tue Apr 12 10:26:46 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.3.0. Check the installed changes-6.3.0 file for the
complete list of changes.
* The QtNfc module has been added.
* New QML tools have been added: pyside6-metaobjectdump,
pyside6-qmltyperegistrar and pyside6-qmllint.
* Several class decorators have been added for QML: QmlAttached,
QmlExtended, QmlForeign, QmlNamedElement, QmlSingleton and
QmlUncreatable.
* class QPyQmlPropertyValueSource for implementing QML value
property sources has been added.
* QML code has been split out from libpyside into a new library
libpysideqml. libpyside thus no longer depends on QtQml and
pyside.h no longer includes QML headers. pyside.h has been
split into smaller headers.
* A context manager for override cursors has been added. It is
now possible to write code like: with
QApplication.setOverrideCursor(Qt.WaitCursor):...
- Don't build QtWebEngine bindings on 32 bits archs.
-------------------------------------------------------------------
Wed Mar 23 11:37:45 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.2.4
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/doc/changelogs/changes-6.2.4
- Drop patches, now upstream:
* 0001-Prospective-fix-for-broken-QByteArray-__msetitem__-o.patch
* 0002-Refactor-code-snippets-for-QByteArray-__msetitem__-_.patch
-------------------------------------------------------------------
Thu Feb 3 15:43:44 UTC 2022 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.2.3
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/doc/changelogs/changes-6.2.3
- Add upstream patches to fix issues on big endian archs:
* 0001-Prospective-fix-for-broken-QByteArray-__msetitem__-o.patch
* 0002-Refactor-code-snippets-for-QByteArray-__msetitem__-_.patch
- Update _constraints for pyside6.
-------------------------------------------------------------------
Thu Dec 9 08:23:19 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.2.2
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/doc/changelogs/changes-6.2.2
- Rebase patches:
* 0001-Don-t-install-CMake-files-into-versioned-directories.patch
* 0001-Always-link-to-python-libraries.patch
-------------------------------------------------------------------
Sat Oct 30 09:41:32 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.2.1
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/dist/changes-6.2.1
- Drop upstream changes:
* 0001-Fix-hang-in-test-bug_430.py-in-Qt-6.3.patch
* 0001-shiboken6-Adapt-to-LLVM-12.01.patch
-------------------------------------------------------------------
Tue Oct 12 09:51:22 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patches to fix a test failure...
* 0001-Fix-hang-in-test-bug_430.py-in-Qt-6.3.patch
- ...and failures with llvm > 12
* 0001-shiboken6-Adapt-to-LLVM-12.01.patch
-------------------------------------------------------------------
Thu Sep 30 13:14:54 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 6.2.0
-------------------------------------------------------------------
Tue Jul 27 16:40:23 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Init python3-pyside6
- Add patches:
* 0001-Don-t-install-CMake-files-into-versioned-directories.patch
* 0001-Always-link-to-python-libraries.patch

325
python3-pyside6.spec Normal file
View File

@ -0,0 +1,325 @@
#
# spec file for package python3-pyside6
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define tar_name pyside-setup-everywhere-src
%define short_version 6.8.0
%global flavor @BUILD_FLAVOR@%{nil}
%if "%flavor" == ""
# factory-auto requires the main build_flavor to match the specfile name
%define mypython python3
%global pyside_flavor pyside6
# stop-gap for local builds
BuildRequires: no-build-without-multibuild-flavor
ExclusiveArch: donotbuild
%else
%global pyside_flavor %flavor
%if 0%{suse_version} > 1500
# This builds only for the primary python flavor, it provides the python3 flavor
%define pythons %{primary_python}
%else
# This only works with the SLE15 python module for a more modern python than 3.6.
# The build will stay unresolvable for regular python3 = 3.6
%{?sle15_python_module_pythons}
%endif
%define mypython %pythons
%define __mypython %{expand:%%__%{mypython}}
%define mypython_sitearch %{expand:%%%{mypython}_sitearch}
%endif
Name: %{mypython}-%{pyside_flavor}
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
URL: https://www.qt.io
Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{short_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
BuildRequires: %{mypython}-devel >= 3.7
BuildRequires: %{mypython}-numpy-devel
BuildRequires: %{mypython}-setuptools
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: qt6-macros
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Test)
BuildRequires: cmake(Qt6Xml)
BuildRequires: pkgconfig(libxml-2.0)
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
BuildRequires: qt6-location
BuildRequires: qt6-sql-sqlite
BuildRequires: xvfb-run
# /SECTION
# SECTION essential_modules
BuildRequires: cmake(Qt6Concurrent)
BuildRequires: cmake(Qt6ExampleIconsPrivate)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6Network)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Sql)
BuildRequires: cmake(Qt6Widgets)
# /SECTION
# SECTION optional_modules
BuildRequires: qt6-qml-private-devel
BuildRequires: cmake(Qt63DAnimation)
BuildRequires: cmake(Qt63DCore)
BuildRequires: cmake(Qt63DExtras)
BuildRequires: cmake(Qt63DInput)
BuildRequires: cmake(Qt63DLogic)
BuildRequires: cmake(Qt63DRender)
BuildRequires: cmake(Qt6Bluetooth)
BuildRequires: cmake(Qt6Charts)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6DataVisualization)
BuildRequires: cmake(Qt6Designer)
BuildRequires: cmake(Qt6Graphs)
BuildRequires: cmake(Qt6Help)
BuildRequires: cmake(Qt6HttpServer)
BuildRequires: cmake(Qt6Location)
BuildRequires: cmake(Qt6Multimedia)
BuildRequires: cmake(Qt6MultimediaWidgets)
BuildRequires: cmake(Qt6NetworkAuth)
BuildRequires: cmake(Qt6OpenGL)
BuildRequires: cmake(Qt6OpenGLWidgets)
BuildRequires: cmake(Qt6Positioning)
BuildRequires: cmake(Qt6Qml)
BuildRequires: cmake(Qt6Quick)
BuildRequires: cmake(Qt6Quick3D)
BuildRequires: cmake(Qt6QuickControls2)
BuildRequires: cmake(Qt6QuickTest)
BuildRequires: cmake(Qt6QuickWidgets)
BuildRequires: cmake(Qt6RemoteObjects)
BuildRequires: cmake(Qt6Scxml)
BuildRequires: cmake(Qt6Sensors)
BuildRequires: cmake(Qt6SerialBus)
BuildRequires: cmake(Qt6SerialPort)
BuildRequires: cmake(Qt6SpatialAudio)
BuildRequires: cmake(Qt6StateMachine)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6SvgWidgets)
BuildRequires: cmake(Qt6TextToSpeech)
BuildRequires: cmake(Qt6UiPlugin)
BuildRequires: cmake(Qt6UiTools)
BuildRequires: cmake(Qt6WebChannel)
%ifarch x86_64 %x86_64 aarch64 riscv64
BuildRequires: cmake(Qt6Pdf)
BuildRequires: cmake(Qt6PdfWidgets)
BuildRequires: cmake(Qt6WebEngineCore)
BuildRequires: cmake(Qt6WebEngineQuick)
BuildRequires: cmake(Qt6WebEngineWidgets)
%endif
BuildRequires: cmake(Qt6WebSockets)
# /SECTION
Requires: %{mypython}-shiboken6
%endif
%if 0%{?suse_version} > 1500
Provides: python3-%{pyside_flavor} = %{version}-%{release}
Obsoletes: python3-%{pyside_flavor} < %{version}-%{release}
%endif
%description
Python bindings for the Qt cross-platform application and UI framework.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}
%if 0%{?suse_version} > 1500
Provides: python3-%{pyside_flavor}-devel = %{version}-%{release}
Obsoletes: python3-%{pyside_flavor}-devel < %{version}-%{release}
%endif
%description devel
Python bindings for the Qt cross-platform application and UI framework
%prep
%autosetup -p1 -n %{tar_name}-%{short_version}
# Restore 6.6.1 RPATH value. rpmlint will complain otherwise
sed -i 's#${base}/../shiboken6/##' sources/pyside6/CMakeLists.txt
%build
_libsuffix=$(echo %{_lib} | cut -b4-)
# The python script used to set paths before running tests
# doesn't handle build dirs called 'build'
%global __qt6_builddir %{pyside_flavor}
# Fix installation dir
sed -i 's#purelib#platlib#' sources/shiboken6/cmake/ShibokenHelpers.cmake
pushd sources/%{pyside_flavor}
# numpy changed the include path on 2.0
numpyinc=$(%{__mypython} -c 'import numpy; print(numpy.get_include())')
# NOTE:The compiler and linker flags shall not be defined
%cmake_qt6 \
-DBUILD_TESTS:BOOL=ON \
-DLIB_SUFFIX:STRING="${_libsuffix}" \
-DCMAKE_C_FLAGS:STRING="" \
-DCMAKE_CXX_FLAGS:STRING="" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \
-DPython_EXECUTABLE:STRING=%{__mypython} \
-DNUMPY_INCLUDE_DIR:STRING=${numpyinc} \
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
%if "%{pyside_flavor}" == "shiboken6"
-DCMAKE_SKIP_RPATH:BOOL=ON \
%endif
-DQFP_NO_STRIP:BOOL=ON
%{qt6_build}
popd
%install
pushd sources/%{pyside_flavor}
%{qt6_install}
popd
%if "%{pyside_flavor}" == "shiboken6"
sed -i 's@^#.*env python.*$@#!%{__mypython}@' %{buildroot}%{_bindir}/shiboken_tool.py
%else
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
%endif
# Install egg-info
# qtpaths is needed
export PATH="%{_qt6_bindir}:$PATH"
%__mypython setup.py egg_info --build-type=%{pyside_flavor}
# fdupes macro does not expand this (!?)
sitearch=%{buildroot}%{mypython_sitearch}
cp -r *.egg-info $sitearch
%fdupes $sitearch
%fdupes -s %{buildroot}%{_libdir}/cmake
%check
# the pyside tests need to know the path to the 'qmake' executable
export PATH=%{_qt6_bindir}:$PATH
# Needed by the shiboken tests
export LD_LIBRARY_PATH=%{buildroot}%{_qt6_libdir}:$LD_LIBRARY_PATH
%if "%{pyside_flavor}" == "shiboken6"
# Since we need CMAKE_SKIP_RPATH to avoid having bogus RUNPATH in the shiboken libraries,
# It needs to know the path to a couple tests folders
for dir in libminimal libother libsample libsmart; do
export LD_LIBRARY_PATH=$PWD/sources/shiboken6/shiboken6/tests/$dir:$LD_LIBRARY_PATH
done
# 2023-05-30 Only fails on armv7l
%ifarch armv7l armv7hl
%define excluded_tests 1
ctest_exclude_regex="smart_smart_pointer"
%endif
%endif
%if "%{pyside_flavor}" == "pyside6"
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
%define excluded_tests 1
# Excluded tests (last update: 2024-09-28)
# QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer'
# QtGui_qpen_test times out
# QtMultimediaWidgets_qmultimediawidgets aborts
# Qt3DExtras_qt3dextras_test fails on s390x (timeout) and randomly everywhere else (exception)
# QtPositioning_positioning fails
# QtWidgets_qwidget_test fails randomly
# pyside6-android-deploy_test_pyside6_android_deploy
# QtCore_qoperatingsystemversion_test fails after https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1214edc
ctest_exclude_regex="QtWebEngineWidgets_pyside-474-qtwebengineview|QtGui_qpen_test|QtMultimediaWidgets_qmultimediawidgets|Qt3DExtras_qt3dextras_test|QtPositioning_positioning|pyside6-deploy_test_pyside6_deploy|QtWidgets_qwidget_test|pyside6-android-deploy_test_pyside6_android_deploy|qoperatingsystemversion"
# registry_existence_test randomly times out and QtWebEngineCore_web_engine_custom_scheme asserts
# QtWebEngineCore_qwebenginecookiestore_test, pysidetest_new_inherited_functions_test fail with a mesa error ('MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)')
# QtWidgets_bug_668, QtWidgets_bug_728 segfault
%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}
%{?xvfb_command}
ctest \
--output-on-failure \
--force-new-ctest-process \
--test-dir %{__qt6_builddir} \
--parallel %{_smp_build_ncpus} \
%{?excluded_tests:--exclude-regex "($ctest_exclude_regex)"}
popd
%ldconfig_scriptlets
%files
%license sources/%{pyside_flavor}/COPYING*
%doc doc/changelogs/changes-*
%{_libdir}/lib%{pyside_flavor}.abi3.so.*
%if "%{pyside_flavor}" == "shiboken6"
%{_bindir}/shiboken6
%{_bindir}/shiboken_tool.py
%{mypython_sitearch}/shiboken6/
%{mypython_sitearch}/shiboken6_generator/
%endif
%if "%{pyside_flavor}" == "pyside6"
%{_libdir}/libpyside6qml.abi3.so.*
%dir %{_qt6_pluginsdir}/designer
%{_qt6_pluginsdir}/designer/libPySidePlugin.so
%{mypython_sitearch}/PySide6/
%endif
%{mypython_sitearch}/*.egg-info
%files devel
%if "%{pyside_flavor}" == "shiboken6"
%{_includedir}/shiboken6/
%{_qt6_cmakedir}/Shiboken6/
%{_qt6_cmakedir}/Shiboken6Tools/
%endif
%if "%{pyside_flavor}" == "pyside6"
%{_datadir}/PySide6/
%{_includedir}/PySide6/
%{_libdir}/libpyside6qml.abi3.so
%{_qt6_cmakedir}/PySide6/
%{_qt6_cmakedir}/PySide6Qml/
%endif
%{_libdir}/lib%{pyside_flavor}.abi3.so
%{_libdir}/pkgconfig/%{pyside_flavor}.pc
%changelog