From 6df811c770f1f70d291ba0c74bd9afabb8efd756bbbd84b246c279007838eec0 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 14 Mar 2023 20:07:35 +0000 Subject: [PATCH] Accepting request 1071325 from home:alarrosa:branches:KDE:Qt:PyQt - Add patch to support Python 3.6 in order to build for SLE/Leap 15: * support-python3.6.patch OBS-URL: https://build.opensuse.org/request/show/1071325 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:PyQt/python-PyQt6-sip?expand=0&rev=12 --- python-PyQt6-sip.changes | 7 ++++++ python-PyQt6-sip.spec | 6 +++-- support-python3.6.patch | 53 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 support-python3.6.patch diff --git a/python-PyQt6-sip.changes b/python-PyQt6-sip.changes index b849d86..2664551 100644 --- a/python-PyQt6-sip.changes +++ b/python-PyQt6-sip.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 14 06:16:41 UTC 2023 - Antonio Larrosa + +- Add patch to support Python 3.6 in order to build for + SLE/Leap 15: + * support-python3.6.patch + ------------------------------------------------------------------- Sun Jan 29 19:42:14 UTC 2023 - Ben Greiner diff --git a/python-PyQt6-sip.spec b/python-PyQt6-sip.spec index 5beb165..2aa51c4 100644 --- a/python-PyQt6-sip.spec +++ b/python-PyQt6-sip.spec @@ -23,7 +23,9 @@ Summary: The sip module support for PyQt6 License: GPL-2.0-only OR GPL-3.0-only OR SUSE-SIP URL: https://www.riverbankcomputing.com/software/sip/ Source0: https://files.pythonhosted.org/packages/source/P/PyQt6-sip/PyQt6_sip-%{version}.tar.gz -BuildRequires: %{python_module devel >= 3.7} +# PATCH-FIX-SLE support-python3.6.patch alarrosa@suse.com -- Let python-PyQt6-sip work with SLE's python3.6 +Patch0: support-python3.6.patch +BuildRequires: %{python_module devel >= 3.6} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -40,7 +42,7 @@ can also be used write self contained extension modules, i.e. without a library to be wrapped. %prep -%setup -q -n PyQt6_sip-%{version} +%autosetup -p1 -n PyQt6_sip-%{version} %build export CFLAGS="%{optflags}" diff --git a/support-python3.6.patch b/support-python3.6.patch new file mode 100644 index 0000000..e2b24ee --- /dev/null +++ b/support-python3.6.patch @@ -0,0 +1,53 @@ +Index: PyQt6_sip-13.4.1/PKG-INFO +=================================================================== +--- PyQt6_sip-13.4.1.orig/PKG-INFO ++++ PyQt6_sip-13.4.1/PKG-INFO +@@ -9,7 +9,7 @@ License: SIP + Platform: X11 + Platform: macOS + Platform: Windows +-Requires-Python: >=3.7 ++Requires-Python: >=3.6 + License-File: LICENSE + License-File: LICENSE-GPL3 + License-File: LICENSE-GPL2 +Index: PyQt6_sip-13.4.1/PyQt6_sip.egg-info/PKG-INFO +=================================================================== +--- PyQt6_sip-13.4.1.orig/PyQt6_sip.egg-info/PKG-INFO ++++ PyQt6_sip-13.4.1/PyQt6_sip.egg-info/PKG-INFO +@@ -9,7 +9,7 @@ License: SIP + Platform: X11 + Platform: macOS + Platform: Windows +-Requires-Python: >=3.7 ++Requires-Python: >=3.6 + License-File: LICENSE + License-File: LICENSE-GPL3 + License-File: LICENSE-GPL2 +Index: PyQt6_sip-13.4.1/setup.py +=================================================================== +--- PyQt6_sip-13.4.1.orig/setup.py ++++ PyQt6_sip-13.4.1/setup.py +@@ -40,6 +40,6 @@ setup( + name='PyQt6_sip', + version='13.4.1', + license='SIP', +- python_requires='>=3.7', ++ python_requires='>=3.6', + ext_modules=[module] + ) +Index: PyQt6_sip-13.4.1/sip.h +=================================================================== +--- PyQt6_sip-13.4.1.orig/sip.h ++++ PyQt6_sip-13.4.1/sip.h +@@ -24,8 +24,8 @@ + #include + + /* Sanity check on the Python version. */ +-#if PY_VERSION_HEX < 0x03070000 +-#error "This version of PyQt6.sip requires Python v3.7 or later" ++#if PY_VERSION_HEX < 0x03060000 ++#error "This version of PyQt6.sip requires Python v3.6 or later" + #endif + +