Sync from SUSE:SLFO:Main python3-pyside6 revision 8942a354fc2b72597c11f26f59e5df1d

This commit is contained in:
Adrian Schröter 2024-09-11 10:23:19 +02:00
parent 7d0cb52899
commit 4e39142ead
7 changed files with 145 additions and 40 deletions

View File

@ -5,17 +5,17 @@
</conditions> </conditions>
<hardware> <hardware>
<disk> <disk>
<size unit="M">3500</size> <size unit="G">4</size>
</disk> </disk>
</hardware> </hardware>
</overwrite> </overwrite>
<overwrite> <overwrite>
<conditions> <conditions>
<package>python3-pyside6</package> <package>python3-pyside6:pyside6</package>
</conditions> </conditions>
<hardware> <hardware>
<disk> <disk>
<size unit="G">6</size> <size unit="G">7</size>
</disk> </disk>
<memory> <memory>
<size unit="G">6</size> <size unit="G">6</size>

View File

@ -1,4 +1,5 @@
<multibuild> <multibuild>
<flavor>pyside6</flavor>
<flavor>shiboken6</flavor> <flavor>shiboken6</flavor>
</multibuild> </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
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;
}

BIN
pyside-setup-everywhere-src-6.6.2.tar.xz (Stored with Git LFS)

Binary file not shown.

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

Binary file not shown.

View File

@ -1,8 +1,45 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 6 16:43:26 UTC 2024 - Antonio Larrosa <alarrosa@suse.com> Wed Jun 19 07:48:28 UTC 2024 - Christophe Marin <christophe@krop.fr>
- Revert change from Jan 26 to keep creating packages with python3 - Update to 6.7.2. Check the installed changes-6.7.2 file for the
prefix. 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> Wed Mar 27 08:26:57 UTC 2024 - Christophe Marin <christophe@krop.fr>

View File

@ -17,17 +17,33 @@
%define tar_name pyside-setup-everywhere-src %define tar_name pyside-setup-everywhere-src
%define short_version 6.6 %define short_version 6.7
#
%if "@BUILD_FLAVOR@%{nil}" == "shiboken6" %global flavor @BUILD_FLAVOR@%{nil}
%global pyside_flavor shiboken6 %if "%flavor" == ""
%else # factory-auto requires the main build_flavor to match the specfile name
%global pyside_flavor pyside6
%endif
%define mypython python3 %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} Name: %{mypython}-%{pyside_flavor}
Version: 6.6.2 Version: 6.7.2
Release: 0 Release: 0
Summary: Python bindings for Qt 6 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 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 Source: https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE # PATCH-FIX-OPENSUSE
Patch0: 0001-Always-link-to-python-libraries.patch 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 # SECTION common_dependencies
BuildRequires: clang-devel BuildRequires: clang-devel
BuildRequires: %{mypython}-Sphinx BuildRequires: %{mypython}-Sphinx
@ -53,7 +71,10 @@ BuildRequires: pkgconfig(libxslt)
# /SECTION # /SECTION
%if "%{pyside_flavor}" == "pyside6" %if "%{pyside_flavor}" == "pyside6"
# For the registry_existence test # For the registry_existence test
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150500
# Not available in 15.5
BuildRequires: %{mypython}-distro BuildRequires: %{mypython}-distro
%endif
BuildRequires: %{mypython}-shiboken6-devel = %{version} BuildRequires: %{mypython}-shiboken6-devel = %{version}
# SECTION test_dependencies # SECTION test_dependencies
BuildRequires: Mesa-dri BuildRequires: Mesa-dri
@ -97,6 +118,7 @@ BuildRequires: cmake(Qt6Qml)
BuildRequires: cmake(Qt6Quick) BuildRequires: cmake(Qt6Quick)
BuildRequires: cmake(Qt6Quick3D) BuildRequires: cmake(Qt6Quick3D)
BuildRequires: cmake(Qt6QuickControls2) BuildRequires: cmake(Qt6QuickControls2)
BuildRequires: cmake(Qt6QuickTest)
BuildRequires: cmake(Qt6QuickWidgets) BuildRequires: cmake(Qt6QuickWidgets)
BuildRequires: cmake(Qt6RemoteObjects) BuildRequires: cmake(Qt6RemoteObjects)
BuildRequires: cmake(Qt6Scxml) BuildRequires: cmake(Qt6Scxml)
@ -122,6 +144,10 @@ BuildRequires: cmake(Qt6WebSockets)
# /SECTION # /SECTION
Requires: %{mypython}-shiboken6 Requires: %{mypython}-shiboken6
%endif %endif
%if 0%{?suse_version} > 1500
Provides: python3-%{pyside_flavor} = %{version}-%{release}
Obsoletes: python3-%{pyside_flavor} < %{version}-%{release}
%endif
%description %description
Python bindings for the Qt cross-platform application and UI framework. 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 %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name} = %{version} 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 %description devel
Python bindings for the Qt cross-platform application and UI framework Python bindings for the Qt cross-platform application and UI framework
@ -158,8 +188,8 @@ pushd sources/%{pyside_flavor}
-DCMAKE_C_FLAGS:STRING="" \ -DCMAKE_C_FLAGS:STRING="" \
-DCMAKE_CXX_FLAGS:STRING="" \ -DCMAKE_CXX_FLAGS:STRING="" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="" \
-DPython_EXECUTABLE:STRING=python3 \ -DPython_EXECUTABLE:STRING=%{__mypython} \
-DNUMPY_INCLUDE_DIR:STRING=%{python_sitearch}/numpy/core/include \ -DNUMPY_INCLUDE_DIR:STRING=%{mypython_sitearch}/numpy/core/include \
-DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \ -DCMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=ON \
%if "%{pyside_flavor}" == "shiboken6" %if "%{pyside_flavor}" == "shiboken6"
-DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=ON \
@ -176,23 +206,18 @@ pushd sources/%{pyside_flavor}
popd popd
%if "%{pyside_flavor}" == "shiboken6" %if "%{pyside_flavor}" == "shiboken6"
sed -i 's@^#.*env python.*$@#!%{__mypython}@' %{buildroot}%{_bindir}/shiboken_tool.py
%fdupes -s %{buildroot}%{python_sitearch}
sed -i 's#env python$#python3#' %{buildroot}%{_bindir}/shiboken_tool.py
%else %else
rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml rm %{buildroot}%{_datadir}/PySide6/typesystems/*_{mac,win}.xml
%fdupes -s %{buildroot}%{python_sitearch}/PySide6
%endif %endif
# Install egg-info # Install egg-info
# qtpaths is needed # qtpaths is needed
export PATH="%{_qt6_bindir}:$PATH" export PATH="%{_qt6_bindir}:$PATH"
python3 setup.py egg_info --build-type=%{pyside_flavor} %__mypython setup.py egg_info --build-type=%{pyside_flavor}
cp -r *.egg-info %{buildroot}%{python_sitearch} # fdupes macro does not expand this (!?)
sitearch=%{buildroot}%{mypython_sitearch}
cp -r *.egg-info $sitearch
%fdupes $sitearch
%fdupes -s %{buildroot}%{_libdir}/cmake %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 xvfb_command xvfb-run -s "-screen 0 1600x1200x16 -ac +extension GLX +render -noreset" \\
%define excluded_tests 1 %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' # QtWebEngineWidgets_pyside-474-qtwebengineview fails with 'ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer'
# QtGui_qpen_test times out # QtGui_qpen_test times out
# QtMultimediaWidgets_qmultimediawidgets aborts # 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 # 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" 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 %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 %endif
# Test broken by https://codereview.qt-project.org/c/pyside/pyside-setup/+/478366 # python311-distro is unavailable in 15.5, skip registry_existence_test
%ifarch aarch64 armv7l armv7hl %if 0%{?sle_version} == 150500
ctest_exclude_regex="$ctest_exclude_regex|QtOpenGL_qopenglwindow_test" ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test"
%endif %endif
%endif %endif
@ -260,16 +286,16 @@ popd
%if "%{pyside_flavor}" == "shiboken6" %if "%{pyside_flavor}" == "shiboken6"
%{_bindir}/shiboken6 %{_bindir}/shiboken6
%{_bindir}/shiboken_tool.py %{_bindir}/shiboken_tool.py
%{python_sitearch}/shiboken6/ %{mypython_sitearch}/shiboken6/
%{python_sitearch}/shiboken6_generator/ %{mypython_sitearch}/shiboken6_generator/
%endif %endif
%if "%{pyside_flavor}" == "pyside6" %if "%{pyside_flavor}" == "pyside6"
%{_libdir}/libpyside6qml.abi3.so.* %{_libdir}/libpyside6qml.abi3.so.*
%dir %{_qt6_pluginsdir}/designer %dir %{_qt6_pluginsdir}/designer
%{_qt6_pluginsdir}/designer/libPySidePlugin.so %{_qt6_pluginsdir}/designer/libPySidePlugin.so
%{python_sitearch}/PySide6/ %{mypython_sitearch}/PySide6/
%endif %endif
%{python_sitearch}/*.egg-info %{mypython_sitearch}/*.egg-info
%files devel %files devel
%if "%{pyside_flavor}" == "shiboken6" %if "%{pyside_flavor}" == "shiboken6"