File project1.diff of Package kdevelop5-plugin-python3
--- kdevelop5-plugin-python3.spec.orig
+++ kdevelop5-plugin-python3.spec
@@ -15,13 +15,19 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
-
%define rname kdev-python
-%if 0%{suse_version} >= 1550
-%define mypython python310
-%else
-%define mypython python3
+
+# %%elif would be better that following trickery, but need rpm-4.15 for that.
+%if 0%{suse_version} >= 1550 || 0%{sle_version} >= 150400
+ %define mypython python310
+%endif
+%if 0%{sle_version} >= 150500
+ %define mypython python311
%endif
+%if 0%{!?mypython}
+ %define mypython python3
+%endif
+
%bcond_without released
Name: kdevelop5-plugin-python3
Version: 22.12.3
@@ -36,8 +42,11 @@ Source2: applications.keyring
%endif
# FIX-PATCH-UPSTREAM fix-for-python3.6.patch alarrosa@suse.com -- Fix build with python < 3.9
Patch0: fix-for-python3.6.patch
-BuildRequires: %mypython >= 3.4.3
-BuildRequires: %mypython-devel >= 3.4.3
+BuildRequires: %mypython >= 3.7.0
+%if 0%{sle_version} >= 150400
+BuildRequires: %mypython-base
+%endif
+BuildRequires: %mypython-devel >= 3.7.0
BuildRequires: extra-cmake-modules
BuildRequires: fdupes
BuildRequires: kdevelop5
@@ -78,7 +87,18 @@ Provides translations to the package %{n
%autosetup -p1 -n %{rname}-%{version}
%build
-%cmake_kf5 -d build
+# %%elif would be better that following trickery, but need rpm-4.15 for that.
+%if 0%{sle_version} >= 150500
+ %cmake_kf5 -d build "-DPYTHON_EXECUTABLE=%{_bindir}/python3.11"
+%endif
+%if 0%{sle_version} < 150500
+ %if 0%{sle_version} >= 150400
+ %cmake_kf5 -d build "-DPYTHON_EXECUTABLE=%{_bindir}/python3.10"
+ %else
+ %cmake_kf5 -d build
+ %endif
+%endif
+
%make_build parser
%cmake_build