From dab0bb9bc5d2bf06382581750d768aa0e4e9213e7b000bc90b35d0a1d9fc5cbb Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Wed, 8 Jan 2025 21:19:26 +0000 Subject: [PATCH] - Update to 6.8.0 * Added support for Qt v6.8 (excluding any technical previews). * Python enums are now handled correctly by Qt Designer (requires Qt v6.8.1 or later). * Implemented QtAudio as a synonym for QAudio. * Added QWindow.setVulkanInstance(), QWindow.vulkanInstance(), QVulkanExtension, QVulkanInstance and QVulkanLayer. * Bug fixes. - Should fix boo#1234295 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:PyQt/python-PyQt6?expand=0&rev=38 --- .gitattributes | 23 ++ .gitignore | 1 + ...rapper-for-dbus-mainloop-integration.patch | 72 +++++ PyQt6-6.7.0.tar.gz | 3 + PyQt6-6.8.0.dev2410061818.tar.gz | 3 + PyQt6-6.8.0.tar.gz | 3 + _constraints | 7 + disable-rpaths.diff | 10 + python-PyQt6.changes | 273 ++++++++++++++++++ python-PyQt6.spec | 245 ++++++++++++++++ 10 files changed, 640 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Use-a-noarch-wrapper-for-dbus-mainloop-integration.patch create mode 100644 PyQt6-6.7.0.tar.gz create mode 100644 PyQt6-6.8.0.dev2410061818.tar.gz create mode 100644 PyQt6-6.8.0.tar.gz create mode 100644 _constraints create mode 100644 disable-rpaths.diff create mode 100644 python-PyQt6.changes create mode 100644 python-PyQt6.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Use-a-noarch-wrapper-for-dbus-mainloop-integration.patch b/0001-Use-a-noarch-wrapper-for-dbus-mainloop-integration.patch new file mode 100644 index 0000000..1afb961 --- /dev/null +++ b/0001-Use-a-noarch-wrapper-for-dbus-mainloop-integration.patch @@ -0,0 +1,72 @@ +From 90b1d19e4a65b1490f4ea277d81cbc96bcaa4c4d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +Date: Sun, 16 Feb 2020 18:00:54 +0100 +Subject: [PATCH] Use a noarch wrapper for dbus mainloop integration + +python-dbus installs in a noarch directory by default, so it not a +suitable place for the binary module. + +Install the binary module to the same directory as all other binary +modules, and just install a small wrapper for dbus.mainloop.pyqt5. +--- + configure.py | 11 +++++++++-- + dbus/dbus.cpp | 8 ++++---- + dbus/pyqt5.py | 5 +++++ + project.py | 6 ++++++ + 4 files changed, 24 insertions(+), 6 deletions(-) + create mode 100644 dbus/pyqt5.py + +Index: PyQt6-6.0.1/dbus/dbus.cpp +=================================================================== +--- PyQt6-6.0.1.orig/dbus/dbus.cpp ++++ PyQt6-6.0.1/dbus/dbus.cpp +@@ -404,11 +404,11 @@ static PyMethodDef module_functions[] = + + + // The module entry point. +-PyMODINIT_FUNC PyInit_pyqt6() ++PyMODINIT_FUNC PyInit_dbus_mainloop() + { + static PyModuleDef module_def = { + PyModuleDef_HEAD_INIT, +- "pyqt6", ++ "dbus_mainloop", + NULL, + -1, + module_functions, +Index: PyQt6-6.0.1/dbus/pyqt6.py +=================================================================== +--- /dev/null ++++ PyQt6-6.0.1/dbus/pyqt6.py +@@ -0,0 +1,5 @@ ++"""Qt main loop integration using "python-PyQt6""" ++ ++__all__ = ('DBusQtMainLoop', ) ++ ++from PyQt6.dbus_mainloop import DBusQtMainLoop +Index: PyQt6-6.0.1/project.py +=================================================================== +--- PyQt6-6.0.1.orig/project.py ++++ PyQt6-6.0.1/project.py +@@ -276,7 +276,7 @@ del find_qt + # Create the buildable. + sources_dir = os.path.join(self.root_dir, 'dbus') + +- buildable = BuildableModule(self, 'dbus', 'dbus.mainloop.pyqt6', ++ buildable = BuildableModule(self, 'dbus', 'PyQt6.dbus_mainloop', + uses_limited_api=True) + buildable.builder_settings.append('QT -= gui') + buildable.sources.extend(glob.glob(os.path.join(sources_dir, '*.cpp'))) +@@ -286,6 +286,12 @@ del find_qt + buildable.libraries.extend(dbus_libs) + buildable.debug = debug + ++ installable = Installable('pyqt6', target_subdir=dbus_module_dir) ++ installable.files.append( ++ os.path.join(self.root_dir, 'dbus', ++ 'pyqt6.py')) ++ self.installables.append(installable) ++ + self.buildables.append(buildable) + + def _add_plugin(self, name, user_name, target_name, target_subdir, debug): diff --git a/PyQt6-6.7.0.tar.gz b/PyQt6-6.7.0.tar.gz new file mode 100644 index 0000000..3764224 --- /dev/null +++ b/PyQt6-6.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d31b2c59dc378ee26e16586d9469842483588142fc377280aad22aaf2fa6235 +size 1050408 diff --git a/PyQt6-6.8.0.dev2410061818.tar.gz b/PyQt6-6.8.0.dev2410061818.tar.gz new file mode 100644 index 0000000..e58f47f --- /dev/null +++ b/PyQt6-6.8.0.dev2410061818.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:256f9329c008009d4d708d6251c54f504606c5c7c6313fa66b5f68bd72d41e2b +size 1061871 diff --git a/PyQt6-6.8.0.tar.gz b/PyQt6-6.8.0.tar.gz new file mode 100644 index 0000000..ca1c816 --- /dev/null +++ b/PyQt6-6.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d8628de4c2a050f0b74462e4c9cb97f839bf6ffabbca91711722ffb281570d9 +size 1061357 diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..5dc7766 --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 12 + + + diff --git a/disable-rpaths.diff b/disable-rpaths.diff new file mode 100644 index 0000000..240bb84 --- /dev/null +++ b/disable-rpaths.diff @@ -0,0 +1,10 @@ +Index: PyQt5_gpl-5.12/designer/designer.pro-in +=================================================================== +--- PyQt5_gpl-5.12.orig/designer/designer.pro-in ++++ PyQt5_gpl-5.12/designer/designer.pro-in +@@ -1,4 +1,5 @@ + CONFIG += plugin @QTCONFIG@ warn_on ++CONFIG -= rpath_libdirs + QT += designer + + # Work around QTBUG-39300. diff --git a/python-PyQt6.changes b/python-PyQt6.changes new file mode 100644 index 0000000..1651720 --- /dev/null +++ b/python-PyQt6.changes @@ -0,0 +1,273 @@ +------------------------------------------------------------------- +Wed Jan 8 15:33:06 UTC 2025 - Ben Greiner + +- Update to 6.8.0 + * Added support for Qt v6.8 (excluding any technical previews). + * Python enums are now handled correctly by Qt Designer (requires + Qt v6.8.1 or later). + * Implemented QtAudio as a synonym for QAudio. + * Added QWindow.setVulkanInstance(), QWindow.vulkanInstance(), + QVulkanExtension, QVulkanInstance and QVulkanLayer. + * Bug fixes. +- Should fix boo#1234295 + +------------------------------------------------------------------- +Fri Nov 8 08:57:02 UTC 2024 - Ben Greiner + +- Fix requires_eq replacement gh#openSUSE/python-rpm-macros#185 + +------------------------------------------------------------------- +Tue Nov 5 08:20:32 UTC 2024 - Dominique Leuenberger + +- Avoid using requires_eq, which after the last modifications + conflicts with python singlespec (order of expansion). + +------------------------------------------------------------------- +Wed Oct 16 15:48:52 UTC 2024 - Ben Greiner + +- Change version to 6.8.0~dev2410061818 + * Mark development version for correct order before release +- Changes from 6.7.1 + * SIP v6.8.6 and PyQt6-sip v13.8 are now required for Python + v3.13 support and for Linux on ARM. + +------------------------------------------------------------------- +Wed Oct 16 08:11:34 UTC 2024 - Fabian Vogt + +- Update to 6.8.0.dev2410061818: + * Added support for Qt v6.8 (excluding any technical previews). + * Implemented QtAudio as a synonym for QAudio. + * Bug fixes. + +------------------------------------------------------------------- +Tue Sep 10 14:40:49 UTC 2024 - Antonio Larrosa + +- Use sources from pypi. They're what we were using and upstream + doesn't seem to release sources from their homepage anymore. + +------------------------------------------------------------------- +Sun Apr 21 13:32:25 UTC 2024 - Ben Greiner + +- Update to 6.7.0 + * Implemented QBluetoothUuid.__hash__ +- Switch from development snapshot to pre-release tarball + +------------------------------------------------------------------- +Fri Apr 12 08:17:13 UTC 2024 - Ben Greiner + +- Update to 6.7.0~dev2404081550 + * Added support for Qt v6.7 (excluding any technical previews). + * Bug fixes. +- Use not yet released development version: boo#1222514 + +------------------------------------------------------------------- +Thu Jan 25 20:44:36 UTC 2024 - Ben Greiner + +- Update to 6.6.1 + * Fix QWidgetAction ownership annotations. + +------------------------------------------------------------------- +Mon Oct 30 11:14:53 UTC 2023 - Markéta Machová + +- Update to 6.6.0 + * This adds support for Qt v6.6. +- Drop no longer needed pyqt6-fix-build-with-qt-6.6.0.patch + +------------------------------------------------------------------- +Wed Oct 18 00:34:21 UTC 2023 - llyyr + +- Update to 6.5.3 + * Added support for Python 3.12 and the missing + QAbstractItemModel.multiData() method, as well as the missing + QModelRoleDataSpan class. +- Add patch pyqt6-fix-build-with-qt-6.6.0.patch to fix build with + Qt 6.6.0. +- Set CXX flag "-DQT_NO_INT128" to fix buil with Qt 6.6.0. + +------------------------------------------------------------------- +Wed Sep 27 09:15:27 UTC 2023 - Ben Greiner + +- Update to 6.5.2 + * Added the missing NativeGesture, Quit, EnterEditFocus and + LeaveEditFocus members of QEventType. + +------------------------------------------------------------------- +Thu Jul 20 10:57:34 UTC 2023 - Markéta Machová + +- Update to 6.5.1 + * Added support for QPermission and related classes and methods. + * Added the max_workers argument to uic.compileUiDir() to specify + the maximum number of worker processes to use when compiling + the .ui files in a directory. + * pyuic6 will now compile all the .ui files in a directory if the + name of the directory is passed instead of a .ui file. + * Added the --max-workers command line option to pyuic6. + +------------------------------------------------------------------- +Sat Jun 10 10:48:35 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Mon Apr 24 19:48:32 UTC 2023 - Ben Greiner + +- Update to 6.5.0 + * Added support for Qt v6.5 including the QtSpatialAudio module. + * Bug fixes. + +------------------------------------------------------------------- +Thu Feb 9 10:16:13 UTC 2023 - Ben Greiner + +- Update to v6.4.2 + * Fixed a regression in pylupdate + +------------------------------------------------------------------- +Sun Jan 29 19:44:12 UTC 2023 - Ben Greiner + +- Update to 6.4.1 + * Added allocationLimit() and setAllocationLimit() to + QImageReader. + * Added toHBITMAP(), fromHBITMAP(), toHICON() and fromHICON() to + QImage on Windows. + * Bug fixes. +- Qt6TextToSpeech is not in 15.x + +------------------------------------------------------------------- +Sun Oct 2 22:45:01 UTC 2022 - Ben Greiner + +- Update to version 6.4.0 + * Added support for Qt v6.4 including the QtPdf, QtPdfWidgets and + QtTextToSpeech modules. + * Added QAction.menu() and QAction.setMenu(). + * Bug fixes. + +------------------------------------------------------------------- +Mon Jun 20 21:35:19 UTC 2022 - Ben Greiner + +- Update to version 6.3.1 + * Added qRegisterResourceData() and qUnregisterResourceData() to + QtCore to help in supporting legacy resource files from PyQt5. + * Requires v13.4 of the sip module which adds support for enums + with missing members and the sip.array support. + * Reverted the Qt.GestureType related changes made in v6.2.3 as + they are no longer necessary with the support for missing enum + members. + * The QEvent constructor that takes an int argument is now + deprecated. + * Refactored the draw methods of QPainter to accept sip.array + objects of appropriate types. Such arrays, once initialised, + can be used very efficiently as they do not require repeated + conversion from the usual Python collection types. + * Added resize() to QPolygon, QPolygonF and QXmlStreamAttributes. + * Bug fixes. + +------------------------------------------------------------------- +Wed Apr 13 08:12:05 UTC 2022 - Ben Greiner + +- Update to version 6.3.0 + * Added support for Qt v6.3. + * Bug fixes. +- Enable Quick3D for Tumbleweed + +------------------------------------------------------------------- +Sat Feb 5 20:32:11 UTC 2022 - Ben Greiner + +- Update to version 6.2.3 + * All Qt.GestureType callable arguments will also accept an int. + All callables that return a Qt::GestureType in C++ will return + an int (which can be compared with a Qt.GestureType member). + * Bug fixes. + +------------------------------------------------------------------- +Fri Dec 3 14:36:02 UTC 2021 - Ben Greiner + +- Update to version 6.2.2 + * Added the missing QBluetoothUuid constructors. + * Added the missing QMediaPlayer loop-related methods. + * Bug fixes. + +------------------------------------------------------------------- +Wed Nov 3 14:26:50 UTC 2021 - Ben Greiner + +- Don't require python-sip-devel for python-PyQt6-devel. + The project building against PyQt should explicitly know about + the proper requirement. + +------------------------------------------------------------------- +Fri Oct 29 15:07:23 UTC 2021 - Ben Greiner + +- Update to version 6.2.1 + * Bug fixes. + +------------------------------------------------------------------- +Sun Oct 3 12:46:47 UTC 2021 - Ben Greiner + +- Update to version 6.2.0 + * Added support for Qt v6.2 including the QtBluetooth, + QtMultimedia, QtMultimediaWidgets, QtNfc, QtPositioning, + QtRemoteObjects, QtSensors, QtSerialPort, QtWebChannel and + QtWebSockets modules. + * Added support for QAxContainer on Windows. + * Ported the QtMultimedia examples from PyQt5. + * Bug fixes. +- Drop PyQt6-6.1.1-OpenGL_ES2.patch merged upstream + +------------------------------------------------------------------- +Thu Aug 19 07:33:23 UTC 2021 - Bernhard Wiedemann + +- Stop writing mtime-based pyc files during tests (boo#1047218) + +------------------------------------------------------------------- +Wed Jul 14 22:42:04 UTC 2021 - Ben Greiner + +- Add PyQt6-6.1.1-OpenGL_ES2.patch for building ARM with OpenGL ES2 + https://www.riverbankcomputing.com/pipermail/pyqt/2021-July/044117.html +- first obs service cleaned specfile commit + +------------------------------------------------------------------- +Tue Jul 6 11:52:55 UTC 2021 - Ben Greiner + +- remove the noop %requires_ge libqt6-x11 + +------------------------------------------------------------------- +Mon Jul 5 22:43:38 UTC 2021 - Ben Greiner + +- Define skip_python2 for Leap + +------------------------------------------------------------------- +Tue Jun 15 13:08:10 UTC 2021 - Ben Greiner + +* Update to version 6.1.1 + * Added the missing QtCore.QXmlStreamAttributes class. + * Added the missing QtQml.QQmlExtensionPlugin class. + * Added the --exclude command line option to pylupdate6. + * pylupdate6 now handles PEP 263 embedded source encodings in .py + files. + * Bug fixes. + +------------------------------------------------------------------- +Thu May 13 18:25:03 UTC 2021 - Ben Greiner + +- Update to version 6.1.0 + * Added support for Qt v6.1. + * All flag-based enums have been renamed so that they use the + name of the Qt enum rather than the name of the Qt QFlag. + * An integer ARGB value can now be used whenever a QColor is + expected. + +------------------------------------------------------------------- +Thu Mar 11 19:52:16 UTC 2021 - Ben Greiner + +- Update to version 6.0.3 + * Bug fixes. + +------------------------------------------------------------------- +Thu Feb 25 11:12:29 UTC 2021 - Ben Greiner + +- Update to version 6.0.2 + * Bug fixes. + +------------------------------------------------------------------- +Fri Feb 19 23:59:18 UTC 2021 - Ben Greiner + +- Initial specfile for version 6.0.1, based on python-qt5 diff --git a/python-PyQt6.spec b/python-PyQt6.spec new file mode 100644 index 0000000..0dc2295 --- /dev/null +++ b/python-PyQt6.spec @@ -0,0 +1,245 @@ +# +# spec file +# +# Copyright (c) 2021 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 plainpython python +%define mname PyQt6 +%define pyqt_build_for_qt6 1 +%{?sle15_python_module_pythons} +Name: python-%{mname} +Version: 6.8.0 +Release: 0 +Summary: Python bindings for Qt 6 +License: GPL-3.0-only OR SUSE-GPL-2.0-with-FLOSS-exception OR NonFree +Group: Development/Libraries/Python +URL: https://www.riverbankcomputing.com/software/pyqt +Source: https://files.pythonhosted.org/packages/source/P/PyQt6/PyQt6-%{version}.tar.gz +# PATCH-FIX-OPENSUSE - disable-rpaths.diff - Disable RPATH when building PyQt6. +Patch0: disable-rpaths.diff +# PATCH-FIX-OPENSUSE - install binary dbus mainloop integration in arch dependent directory +Patch1: 0001-Use-a-noarch-wrapper-for-dbus-mainloop-integration.patch +BuildRequires: %{python_module PyQt6-sip >= 13.8} +BuildRequires: %{python_module dbus-python-devel >= 0.8} +BuildRequires: %{python_module devel >= 3.9} +BuildRequires: %{python_module pyqt-builder >= 1.17} +BuildRequires: %{python_module sip-devel >= 6.9} +BuildRequires: dbus-1-devel +BuildRequires: dos2unix +BuildRequires: fdupes +BuildRequires: gdb +BuildRequires: python-pyqt-rpm-macros +BuildRequires: python-rpm-macros +BuildRequires: qt6-base-devel +BuildRequires: qt6-macros +BuildRequires: cmake(Qt6Bluetooth) +BuildRequires: cmake(Qt6Designer) +BuildRequires: cmake(Qt6DBus) +BuildRequires: cmake(Qt6Help) +BuildRequires: cmake(Qt6Multimedia) +BuildRequires: cmake(Qt6MultimediaWidgets) +BuildRequires: cmake(Qt6Network) +BuildRequires: cmake(Qt6Nfc) +BuildRequires: cmake(Qt6OpenGL) +BuildRequires: cmake(Qt6OpenGLWidgets) +%if %{?suse_version} >= 1550 +# no pdf headers in 15.X +%ifarch aarch64 x86_64 riscv64 +# qt6-pdf-devel is built in qt6-webengine with ExclusiveArch +BuildRequires: cmake(Qt6Pdf) +BuildRequires: cmake(Qt6PdfWidgets) +%endif +%endif +BuildRequires: cmake(Qt6Positioning) +BuildRequires: cmake(Qt6PrintSupport) +BuildRequires: cmake(Qt6Qml) +BuildRequires: cmake(Qt6Quick) +BuildRequires: cmake(Qt6QuickWidgets) +%if %{?suse_version} >= 1550 +BuildRequires: cmake(Qt6Quick3D) +BuildRequires: cmake(Qt6Quick3DRuntimeRender) +%endif +BuildRequires: cmake(Qt6RemoteObjects) +BuildRequires: cmake(Qt6Sensors) +BuildRequires: cmake(Qt6SerialPort) +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 155000 +BuildRequires: cmake(Qt6SpatialAudio) +%endif +BuildRequires: cmake(Qt6Sql) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6SvgWidgets) +BuildRequires: cmake(Qt6Test) +%if %{?suse_version} >= 1550 +BuildRequires: cmake(Qt6TextToSpeech) +%endif +BuildRequires: cmake(Qt6WebChannel) +BuildRequires: cmake(Qt6WebSockets) +BuildRequires: cmake(Qt6Widgets) +BuildRequires: cmake(Qt6Xml) +Requires: python-PyQt6-sip >= %(rpm -q --whatprovides python-PyQt6-sip --qf "%%{version}") +Requires: python-dbus-python >= %(rpm -q --whatprovides python-dbus-python --qf "%%{version}") +Provides: python-qt6 = %{version}-%{release} +%python_subpackages + +%description +PyQt is a set of Python bindings for the Qt framework. + +%package devel +Summary: PyQt - devel part of python bindings for Qt 6 +Group: Development/Libraries/Python +Requires: python-%{mname} = %{version} +Requires: python-dbus-python-devel >= 0.8 +Requires: python-devel +Requires: qt6-base-devel +Requires: qt6-macros +Requires: cmake(Qt6Bluetooth) +Requires: cmake(Qt6Designer) +Requires: cmake(Qt6DBus) +Requires: cmake(Qt6Help) +Requires: cmake(Qt6Multimedia) +Requires: cmake(Qt6MultimediaWidgets) +Requires: cmake(Qt6Network) +Requires: cmake(Qt6Nfc) +Requires: cmake(Qt6OpenGL) +Requires: cmake(Qt6OpenGLWidgets) +%if %{?suse_version} >= 1550 +# no pdf headers in 15.X +%ifarch aarch64 x86_64 riscv64 +# qt6-pdf-devel is built in qt6-webengine with ExclusiveArch +Requires: cmake(Qt6Pdf) +Requires: cmake(Qt6PdfWidgets) +%endif +%endif +Requires: cmake(Qt6Positioning) +Requires: cmake(Qt6PrintSupport) +Requires: cmake(Qt6Qml) +Requires: cmake(Qt6Quick) +Requires: cmake(Qt6QuickWidgets) +%if %{?suse_version} >= 1550 +Requires: cmake(Qt6Quick3D) +Requires: cmake(Qt6Quick3DRuntimeRender) +%endif +Requires: cmake(Qt6RemoteObjects) +Requires: cmake(Qt6Sensors) +Requires: cmake(Qt6SerialPort) +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 155000 +Requires: cmake(Qt6SpatialAudio) +%endif +Requires: cmake(Qt6Sql) +Requires: cmake(Qt6Svg) +Requires: cmake(Qt6SvgWidgets) +Requires: cmake(Qt6Test) +%if %{?suse_version} >= 1550 +Requires: cmake(Qt6TextToSpeech) +%endif +Requires: cmake(Qt6WebChannel) +Requires: cmake(Qt6WebSockets) +Requires: cmake(Qt6Widgets) +Requires: cmake(Qt6Xml) +Requires: %plainpython(abi) = %{python_version} +Requires(post): update-alternatives +Requires(postun):update-alternatives +# If and which version of sip is required depends on the project trying +# to build against PyQt6. +Recommends: python-sip-devel +Recommends: python-qscintilla-qt6 +Provides: python-qt6-devel = %{version}-%{release} + +%description devel +PyQt is a set of Python bindings for the Qt framework. + +This package contains all the developer tools you need to create your +own PyQt applications + +%package doc +Summary: Examples for %{name} +Group: Documentation/Other +Provides: python-qt6-doc = %{version} +BuildArch: noarch + +%description doc +PyQt is a set of Python bindings for the Qt framework. + +This package contains programming examples for PyQt6. + +%prep +%autosetup -p1 -n PyQt6-%{version} +dos2unix examples/quick/models/*/view.qml +dos2unix examples/multimedia*/*/*.ui + +%build + +# -DQT_NO_INT128 is required to build with Qt 6.6.0. +%{pyqt_build -v \ + -s %{quote:--pep484-pyi \ + --confirm-license \ + --qt-shared \ + --qmake-setting 'QMAKE_CXXFLAGS_RELEASE=%{optflags} -DQT_NO_INT128'}} + +%install +%pyqt_install +%pyqt_install_examples %mname + +%python_clone -a %{buildroot}%{_bindir}/pyuic6 +%python_clone -a %{buildroot}%{_bindir}/pylupdate6 + +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +export PYTHONDONTWRITEBYTECODE=1 # boo#1047218 +%{python_expand # there is no test suite. If it compiles and imports, it should be okay. +export PYTHONPATH=%{buildroot}%{$python_sitearch} +$python -c 'from PyQt6 import QtCore; assert QtCore.PYQT_VERSION_STR == "%{version}"' +} + +%post devel +%python_install_alternative pyuic6 pylupdate6 + +%postun devel +%python_uninstall_alternative pyuic6 + +%files %{python_files} +%license LICENSE +%doc README.md NEWS ChangeLog +%{python_sitearch}/PyQt6/ +%{python_sitearch}/PyQt6-%{version}.dist-info/ +%dir %{python_sitelib}/dbus +%dir %{python_sitelib}/dbus/mainloop +%{python_sitelib}/dbus/mainloop/pyqt6.py +%dir %{_qt6_pluginsdir}/PyQt6/ +%{_qt6_pluginsdir}/PyQt6/libpy%{python_bin_suffix}qt6qmlplugin.so +%exclude %pyqt6_sipdir + +%files %{python_files devel} +%license LICENSE +%python_alternative %{_bindir}/pyuic6 +%python_alternative %{_bindir}/pylupdate6 +%dir %{_qt6_pluginsdir}/designer/ +%{_qt6_pluginsdir}/designer/libpy%{python_bin_suffix}qt6.so +%dir %{_qt6_datadir}/qsci/ +%dir %{_qt6_datadir}/qsci/api/ +%dir %{_qt6_datadir}/qsci/api/python_%{python_bin_suffix}/ +%{_qt6_datadir}/qsci/api/python_%{python_bin_suffix}/PyQt6.api +%pyqt6_sipdir + +%files %{python_files doc} +%license LICENSE +%{_docdir}/%{python_prefix}-%{mname} +%exclude %{_docdir}/%{python_prefix}-%{mname}/README.md +%exclude %{_docdir}/%{python_prefix}-%{mname}/NEWS +%exclude %{_docdir}/%{python_prefix}-%{mname}/ChangeLog + +%changelog