diff --git a/_constraints b/_constraints
index 6a18e87..555b79b 100644
--- a/_constraints
+++ b/_constraints
@@ -5,17 +5,17 @@
- 3500
+ 4
- python3-pyside6
+ python3-pyside6:pyside6
- 6
+ 7
6
diff --git a/_multibuild b/_multibuild
index 2870e16..23fb848 100644
--- a/_multibuild
+++ b/_multibuild
@@ -1,4 +1,5 @@
+ pyside6
shiboken6
diff --git a/fix-pytest-qt.patch b/fix-pytest-qt.patch
new file mode 100644
index 0000000..5c95ac1
--- /dev/null
+++ b/fix-pytest-qt.patch
@@ -0,0 +1,41 @@
+From: Antonio Larrosa
+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: 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
+
+Index: pyside-setup-everywhere-src-6.7.1/sources/pyside6/libpyside/pysidesignal.cpp
+===================================================================
+--- pyside-setup-everywhere-src-6.7.1.orig/sources/pyside6/libpyside/pysidesignal.cpp
++++ pyside-setup-everywhere-src-6.7.1/sources/pyside6/libpyside/pysidesignal.cpp
+@@ -718,7 +718,7 @@ static PyObject *signalInstanceDisconnec
+ 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;
+ }
diff --git a/pyside-setup-everywhere-src-6.6.2.tar.xz b/pyside-setup-everywhere-src-6.6.2.tar.xz
deleted file mode 100644
index c519e9c..0000000
--- a/pyside-setup-everywhere-src-6.6.2.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:14620b694d7af4c978443016292d3d2108ba5dc105f4170e3b71eadcaf04c9f0
-size 13975896
diff --git a/pyside-setup-everywhere-src-6.7.2.tar.xz b/pyside-setup-everywhere-src-6.7.2.tar.xz
new file mode 100644
index 0000000..0421790
--- /dev/null
+++ b/pyside-setup-everywhere-src-6.7.2.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a2b0d0d6e78c9aa5ddc7f06ca4b6f11a3fe14560baeb148eea53b5d98e368c7
+size 14402156
diff --git a/python3-pyside6.changes b/python3-pyside6.changes
index f4a4d14..3eef0c2 100644
--- a/python3-pyside6.changes
+++ b/python3-pyside6.changes
@@ -1,8 +1,45 @@
-------------------------------------------------------------------
-Tue Aug 6 16:43:26 UTC 2024 - Antonio Larrosa
+Wed Jun 19 07:48:28 UTC 2024 - Christophe Marin
-- Revert change from Jan 26 to keep creating packages with python3
- prefix.
+- 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
+
+- 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
+
+- Update build constraints
+
+-------------------------------------------------------------------
+Fri May 24 11:22:44 UTC 2024 - Christophe Marin
+
+- 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
+
+- Add upstream change:
+ * 0001-Multimedia-Adapt-to-revert-of-QAudio-QtAudio-namespa.patch
+
+-------------------------------------------------------------------
+Mon Apr 8 08:50:25 UTC 2024 - Christophe Marin
+
+- 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
diff --git a/python3-pyside6.spec b/python3-pyside6.spec
index aedeb27..2be76de 100644
--- a/python3-pyside6.spec
+++ b/python3-pyside6.spec
@@ -17,17 +17,33 @@
%define tar_name pyside-setup-everywhere-src
-%define short_version 6.6
-#
-%if "@BUILD_FLAVOR@%{nil}" == "shiboken6"
-%global pyside_flavor shiboken6
-%else
-%global pyside_flavor pyside6
-%endif
+%define short_version 6.7
+
+%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.6.2
+Version: 6.7.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
@@ -35,6 +51,8 @@ URL: https://www.qt.io
Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{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
# SECTION common_dependencies
BuildRequires: clang-devel
BuildRequires: %{mypython}-Sphinx
@@ -53,7 +71,10 @@ 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
@@ -97,6 +118,7 @@ BuildRequires: cmake(Qt6Qml)
BuildRequires: cmake(Qt6Quick)
BuildRequires: cmake(Qt6Quick3D)
BuildRequires: cmake(Qt6QuickControls2)
+BuildRequires: cmake(Qt6QuickTest)
BuildRequires: cmake(Qt6QuickWidgets)
BuildRequires: cmake(Qt6RemoteObjects)
BuildRequires: cmake(Qt6Scxml)
@@ -122,6 +144,10 @@ 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.
@@ -129,6 +155,10 @@ 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
@@ -158,8 +188,8 @@ pushd sources/%{pyside_flavor}
-DCMAKE_C_FLAGS:STRING="" \
-DCMAKE_CXX_FLAGS:STRING="" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \
- -DPython_EXECUTABLE:STRING=python3 \
- -DNUMPY_INCLUDE_DIR:STRING=%{python_sitearch}/numpy/core/include \
+ -DPython_EXECUTABLE:STRING=%{__mypython} \
+ -DNUMPY_INCLUDE_DIR:STRING=%{mypython_sitearch}/numpy/core/include \
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
%if "%{pyside_flavor}" == "shiboken6"
-DCMAKE_SKIP_RPATH:BOOL=ON \
@@ -176,23 +206,18 @@ pushd sources/%{pyside_flavor}
popd
%if "%{pyside_flavor}" == "shiboken6"
-
-%fdupes -s %{buildroot}%{python_sitearch}
-
-sed -i 's#env python$#python3#' %{buildroot}%{_bindir}/shiboken_tool.py
-
+sed -i 's@^#.*env python.*$@#!%{__mypython}@' %{buildroot}%{_bindir}/shiboken_tool.py
%else
-
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
-
-%fdupes -s %{buildroot}%{python_sitearch}/PySide6
-
%endif
# Install egg-info
# qtpaths is needed
export PATH="%{_qt6_bindir}:$PATH"
-python3 setup.py egg_info --build-type=%{pyside_flavor}
-cp -r *.egg-info %{buildroot}%{python_sitearch}
+%__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
@@ -220,7 +245,7 @@ ctest_exclude_regex="smart_smart_pointer"
%define xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
%define excluded_tests 1
-# Excluded tests (last update: 2024-03-27)
+# Excluded tests (last update: 2024-05-27)
# QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer'
# QtGui_qpen_test times out
# QtMultimediaWidgets_qmultimediawidgets aborts
@@ -231,13 +256,14 @@ ctest_exclude_regex="smart_smart_pointer"
# 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"
-# Random failures on aarch64: registry_existence_test times out and QtWebEngineCore_web_engine_custom_scheme asserts
+# registry_existence_test randomly times out and QtWebEngineCore_web_engine_custom_scheme asserts
+# QtWebEngineCore_qwebenginecookiestore_test fails with a mesa error ('MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER)')
%ifarch aarch64
-ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme"
+ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test|QtWebEngineCore_web_engine_custom_scheme|QtWebEngineCore_qwebenginecookiestore_test"
%endif
-# Test broken by https://codereview.qt-project.org/c/pyside/pyside-setup/+/478366
-%ifarch aarch64 armv7l armv7hl
-ctest_exclude_regex="$ctest_exclude_regex|QtOpenGL_qopenglwindow_test"
+# 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
@@ -260,16 +286,16 @@ popd
%if "%{pyside_flavor}" == "shiboken6"
%{_bindir}/shiboken6
%{_bindir}/shiboken_tool.py
-%{python_sitearch}/shiboken6/
-%{python_sitearch}/shiboken6_generator/
+%{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
-%{python_sitearch}/PySide6/
+%{mypython_sitearch}/PySide6/
%endif
-%{python_sitearch}/*.egg-info
+%{mypython_sitearch}/*.egg-info
%files devel
%if "%{pyside_flavor}" == "shiboken6"