2021-07-05 19:54:00 +02:00
|
|
|
#
|
2021-07-15 12:12:02 +02:00
|
|
|
# spec file
|
2021-07-05 19:54:00 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-12-03 19:21:21 +01:00
|
|
|
%define plainpython python
|
2021-07-05 19:54:00 +02:00
|
|
|
%define mname PyQt6
|
|
|
|
%define pyqt_build_for_qt6 1
|
2023-06-11 16:58:46 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-07-05 19:54:00 +02:00
|
|
|
Name: python-%{mname}
|
2024-04-21 15:33:57 +02:00
|
|
|
Version: 6.7.0
|
2021-07-05 19:54:00 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python bindings for Qt 6
|
2021-07-15 12:12:02 +02:00
|
|
|
License: GPL-3.0-only OR SUSE-GPL-2.0-with-FLOSS-exception OR NonFree
|
2021-07-05 19:54:00 +02:00
|
|
|
Group: Development/Libraries/Python
|
|
|
|
URL: https://www.riverbankcomputing.com/software/pyqt
|
2024-04-12 11:35:14 +02:00
|
|
|
# boo#1222514
|
|
|
|
#Source: https://files.pythonhosted.org/packages/source/P/PyQt6/PyQt6-%%{version}.tar.gz
|
2024-04-21 15:33:57 +02:00
|
|
|
Source: https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-%{version}.tar.gz
|
2021-07-05 19:54:00 +02:00
|
|
|
# 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
|
2023-10-18 11:21:10 +02:00
|
|
|
BuildRequires: %{python_module PyQt6-sip >= 13.6}
|
2021-07-05 19:54:00 +02:00
|
|
|
BuildRequires: %{python_module dbus-python-devel >= 0.8}
|
2024-01-25 22:48:48 +01:00
|
|
|
BuildRequires: %{python_module devel >= 3.6.1}
|
|
|
|
BuildRequires: %{python_module pyqt-builder >= 1.15}
|
|
|
|
BuildRequires: %{python_module sip-devel >= 6.5}
|
2021-07-05 19:54:00 +02:00
|
|
|
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
|
2021-10-06 23:13:03 +02:00
|
|
|
BuildRequires: cmake(Qt6Bluetooth)
|
2021-07-05 19:54:00 +02:00
|
|
|
BuildRequires: cmake(Qt6Designer)
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6DBus)
|
2021-07-05 19:54:00 +02:00
|
|
|
BuildRequires: cmake(Qt6Help)
|
2021-10-06 23:13:03 +02:00
|
|
|
BuildRequires: cmake(Qt6Multimedia)
|
|
|
|
BuildRequires: cmake(Qt6MultimediaWidgets)
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6Network)
|
2021-10-06 23:13:03 +02:00
|
|
|
BuildRequires: cmake(Qt6Nfc)
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6OpenGL)
|
|
|
|
BuildRequires: cmake(Qt6OpenGLWidgets)
|
2023-01-30 20:20:15 +01:00
|
|
|
%if %{?suse_version} >= 1550
|
|
|
|
# no pdf headers in 15.X
|
2022-10-03 19:08:36 +02:00
|
|
|
%ifarch aarch64 x86_64 riscv64
|
|
|
|
# qt6-pdf-devel is built in qt6-webengine with ExclusiveArch
|
|
|
|
BuildRequires: cmake(Qt6Pdf)
|
|
|
|
BuildRequires: cmake(Qt6PdfWidgets)
|
|
|
|
%endif
|
2023-01-30 20:20:15 +01:00
|
|
|
%endif
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6Positioning)
|
|
|
|
BuildRequires: cmake(Qt6PrintSupport)
|
2021-07-05 19:54:00 +02:00
|
|
|
BuildRequires: cmake(Qt6Qml)
|
|
|
|
BuildRequires: cmake(Qt6Quick)
|
|
|
|
BuildRequires: cmake(Qt6QuickWidgets)
|
2023-04-26 18:35:21 +02:00
|
|
|
%if %{?suse_version} >= 1550
|
|
|
|
BuildRequires: cmake(Qt6Quick3D)
|
|
|
|
BuildRequires: cmake(Qt6Quick3DRuntimeRender)
|
|
|
|
%endif
|
2021-10-06 23:13:03 +02:00
|
|
|
BuildRequires: cmake(Qt6RemoteObjects)
|
|
|
|
BuildRequires: cmake(Qt6Sensors)
|
|
|
|
BuildRequires: cmake(Qt6SerialPort)
|
2023-04-26 18:35:21 +02:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 155000
|
|
|
|
BuildRequires: cmake(Qt6SpatialAudio)
|
|
|
|
%endif
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6Sql)
|
2021-07-05 19:54:00 +02:00
|
|
|
BuildRequires: cmake(Qt6Svg)
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6SvgWidgets)
|
|
|
|
BuildRequires: cmake(Qt6Test)
|
2023-04-26 18:35:21 +02:00
|
|
|
%if %{?suse_version} >= 1550
|
2023-01-30 20:20:15 +01:00
|
|
|
BuildRequires: cmake(Qt6TextToSpeech)
|
2022-04-14 17:17:18 +02:00
|
|
|
%endif
|
2023-04-26 18:35:21 +02:00
|
|
|
BuildRequires: cmake(Qt6WebChannel)
|
|
|
|
BuildRequires: cmake(Qt6WebSockets)
|
2024-04-12 11:35:14 +02:00
|
|
|
BuildRequires: cmake(Qt6Widgets)
|
|
|
|
BuildRequires: cmake(Qt6Xml)
|
2022-06-25 11:40:21 +02:00
|
|
|
%requires_ge python-PyQt6-sip
|
2021-07-05 19:54:00 +02:00
|
|
|
%requires_ge python-dbus-python
|
|
|
|
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
|
2021-07-15 12:12:02 +02:00
|
|
|
Requires: qt6-base-devel
|
|
|
|
Requires: qt6-macros
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6Bluetooth)
|
2021-07-05 19:54:00 +02:00
|
|
|
Requires: cmake(Qt6Designer)
|
2024-04-12 11:35:14 +02:00
|
|
|
Requires: cmake(Qt6DBus)
|
2021-07-05 19:54:00 +02:00
|
|
|
Requires: cmake(Qt6Help)
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6Multimedia)
|
|
|
|
Requires: cmake(Qt6MultimediaWidgets)
|
2024-04-12 11:35:14 +02:00
|
|
|
Requires: cmake(Qt6Network)
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6Nfc)
|
2024-04-12 11:35:14 +02:00
|
|
|
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
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6Positioning)
|
2024-04-12 11:35:14 +02:00
|
|
|
Requires: cmake(Qt6PrintSupport)
|
2021-07-05 19:54:00 +02:00
|
|
|
Requires: cmake(Qt6Qml)
|
|
|
|
Requires: cmake(Qt6Quick)
|
|
|
|
Requires: cmake(Qt6QuickWidgets)
|
2024-04-12 11:35:14 +02:00
|
|
|
%if %{?suse_version} >= 1550
|
|
|
|
Requires: cmake(Qt6Quick3D)
|
|
|
|
Requires: cmake(Qt6Quick3DRuntimeRender)
|
|
|
|
%endif
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6RemoteObjects)
|
|
|
|
Requires: cmake(Qt6Sensors)
|
|
|
|
Requires: cmake(Qt6SerialPort)
|
2024-04-12 11:35:14 +02:00
|
|
|
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 155000
|
|
|
|
Requires: cmake(Qt6SpatialAudio)
|
|
|
|
%endif
|
|
|
|
Requires: cmake(Qt6Sql)
|
2021-07-05 19:54:00 +02:00
|
|
|
Requires: cmake(Qt6Svg)
|
2024-04-12 11:35:14 +02:00
|
|
|
Requires: cmake(Qt6SvgWidgets)
|
|
|
|
Requires: cmake(Qt6Test)
|
|
|
|
%if %{?suse_version} >= 1550
|
|
|
|
Requires: cmake(Qt6TextToSpeech)
|
|
|
|
%endif
|
2021-10-06 23:13:03 +02:00
|
|
|
Requires: cmake(Qt6WebChannel)
|
|
|
|
Requires: cmake(Qt6WebSockets)
|
2024-04-12 11:35:14 +02:00
|
|
|
Requires: cmake(Qt6Widgets)
|
|
|
|
Requires: cmake(Qt6Xml)
|
2021-12-03 19:21:21 +01:00
|
|
|
Requires: %plainpython(abi) = %{python_version}
|
2021-07-05 19:54:00 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-07-15 12:12:02 +02:00
|
|
|
Requires(postun):update-alternatives
|
2021-11-03 15:27:46 +01:00
|
|
|
# If and which version of sip is required depends on the project trying
|
|
|
|
# to build against PyQt6.
|
|
|
|
Recommends: python-sip-devel
|
2021-07-05 19:54:00 +02:00
|
|
|
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
|
2024-04-21 15:33:57 +02:00
|
|
|
%autosetup -p1 -n PyQt6-%{version}
|
2021-07-05 19:54:00 +02:00
|
|
|
dos2unix examples/quick/models/*/view.qml
|
2021-10-30 00:04:25 +02:00
|
|
|
dos2unix examples/multimedia*/*/*.ui
|
2021-07-05 19:54:00 +02:00
|
|
|
|
|
|
|
%build
|
2023-10-18 11:08:23 +02:00
|
|
|
|
|
|
|
# -DQT_NO_INT128 is required to build with Qt 6.6.0.
|
2021-07-05 19:54:00 +02:00
|
|
|
%{pyqt_build -v \
|
|
|
|
-s %{quote:--pep484-pyi \
|
|
|
|
--confirm-license \
|
2023-10-18 11:08:23 +02:00
|
|
|
--qt-shared \
|
|
|
|
--qmake-setting 'QMAKE_CXXFLAGS_RELEASE=%{optflags} -DQT_NO_INT128'}}
|
2021-07-05 19:54:00 +02:00
|
|
|
|
|
|
|
%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
|
2021-08-19 11:02:41 +02:00
|
|
|
export PYTHONDONTWRITEBYTECODE=1 # boo#1047218
|
2021-07-05 19:54:00 +02:00
|
|
|
%{python_expand # there is no test suite. If it compiles and imports, it should be okay.
|
|
|
|
export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
2024-04-21 15:33:57 +02:00
|
|
|
$python -c 'from PyQt6 import QtCore; assert QtCore.PYQT_VERSION_STR == "%{version}"'
|
2021-07-05 19:54:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
%post devel
|
|
|
|
%python_install_alternative pyuic6 pylupdate6
|
|
|
|
|
|
|
|
%postun devel
|
|
|
|
%python_uninstall_alternative pyuic6
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
2024-04-12 11:35:14 +02:00
|
|
|
%doc README.md NEWS ChangeLog
|
2021-07-05 19:54:00 +02:00
|
|
|
%{python_sitearch}/PyQt6/
|
2024-04-21 15:33:57 +02:00
|
|
|
%{python_sitearch}/PyQt6-%{version}.dist-info/
|
2021-07-05 19:54:00 +02:00
|
|
|
%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}
|
2024-04-12 11:35:14 +02:00
|
|
|
%exclude %{_docdir}/%{python_prefix}-%{mname}/README.md
|
2021-07-05 19:54:00 +02:00
|
|
|
%exclude %{_docdir}/%{python_prefix}-%{mname}/NEWS
|
|
|
|
%exclude %{_docdir}/%{python_prefix}-%{mname}/ChangeLog
|
|
|
|
|
|
|
|
%changelog
|