Accepting request 904243 from home:bnavigator:pyqt

OBS-URL: https://build.opensuse.org/request/show/904243
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:PyQt/python-PyQt6?expand=0&rev=1
This commit is contained in:
Benjamin Greiner 2021-07-05 17:54:00 +00:00 committed by Git OBS Bridge
commit 62dea6c162
8 changed files with 320 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,72 @@
From 90b1d19e4a65b1490f4ea277d81cbc96bcaa4c4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
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):

3
PyQt6-6.1.1.tar.gz Normal file
View File

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

7
_constraints Normal file
View File

@ -0,0 +1,7 @@
<constraints>
<hardware>
<disk>
<size unit="G">12</size>
</disk>
</hardware>
</constraints>

10
disable-rpaths.diff Normal file
View File

@ -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.

37
python-PyQt6.changes Normal file
View File

@ -0,0 +1,37 @@
-------------------------------------------------------------------
Tue Jun 15 13:08:10 UTC 2021 - Ben Greiner <code@bnavigator.de>
* 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 <code@bnavigator.de>
- 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 <code@bnavigator.de>
- Update to version 6.0.3
* Bug fixes.
-------------------------------------------------------------------
Thu Feb 25 11:12:29 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 6.0.2
* Bug fixes.
-------------------------------------------------------------------
Fri Feb 19 23:59:18 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Initial specfile for version 6.0.1, based on python-qt5

167
python-PyQt6.spec Normal file
View File

@ -0,0 +1,167 @@
#
# spec file for package python-PyQt6
#
# 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define oldpython python
%define mname PyQt6
%define pyqt_build_for_qt6 1
Name: python-%{mname}
Version: 6.1.1
Release: 0
Summary: Python bindings for Qt 6
License: SUSE-GPL-2.0-with-FLOSS-exception OR GPL-3.0-only 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 dbus-python-devel >= 0.8}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module PyQt6-sip}
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(Qt6Designer)
BuildRequires: cmake(Qt6Help)
BuildRequires: cmake(Qt6Qml)
BuildRequires: cmake(Qt6Quick)
BuildRequires: cmake(Qt6Quick3D)
BuildRequires: cmake(Qt6Quick3DRuntimeRender)
BuildRequires: cmake(Qt6QuickWidgets)
BuildRequires: cmake(Qt6Svg)
BuildRequires: %{python_module pyqt-builder >= 1.8}
BuildRequires: %{python_module sip-devel >= 6}
BuildRequires: %{python_module PyQt6-sip}
Requires: python-PyQt6-sip
%requires_ge libqt6-x11
%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: qt6-base-devel
Requires: qt6-macros
Requires: python-%{mname} = %{version}
Requires: python-dbus-python-devel >= 0.8
Requires: python-devel
Requires: python-sip-devel >= 6
Requires: cmake(Qt6Designer)
Requires: cmake(Qt6Help)
Requires: cmake(Qt6Qml)
Requires: cmake(Qt6Quick)
Requires: cmake(Qt6Quick3D)
Requires: cmake(Qt6QuickWidgets)
Requires: cmake(Qt6Svg)
Requires(post): update-alternatives
Requires(postun): update-alternatives
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
%build
%{pyqt_build -v \
-s %{quote:--pep484-pyi \
--confirm-license \
--qt-shared}}
%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
%{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 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
%exclude %{_docdir}/%{python_prefix}-%{mname}/NEWS
%exclude %{_docdir}/%{python_prefix}-%{mname}/ChangeLog
%changelog