File project.diff of Package rpmlint

--- rpmlint.spec.orig
+++ rpmlint.spec
@@ -1,5 +1,5 @@
 #
-# spec file for package rpmlint
+# spec file
 #
 # Copyright (c) 2025 SUSE LLC
 #
@@ -16,6 +16,10 @@
 #
 
 
+# Use primary python instead of Python 3.6 since rpmlint v2 requires newer one
+%define python_flavor %{primary_python}
+%define my_python %{expand:%{__%{python_flavor}}}
+
 %define flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == ""
 %define name_suffix %{nil}
@@ -30,13 +34,22 @@ License:        GPL-2.0-or-later
 URL:            https://github.com/rpm-software-management/rpmlint
 Source0:        rpmlint-%{version}.tar.xz
 Patch0:         disable-flake-and-cov.patch
+BuildRequires:  %{python_flavor}-pip
+BuildRequires:  %{python_flavor}-setuptools
+BuildRequires:  %{python_flavor}-wheel
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-BuildRequires:  python3-pip
-BuildRequires:  python3-setuptools
-BuildRequires:  python3-wheel
 BuildArch:      noarch
 %if "%{flavor}" == "test"
+BuildRequires:  %{python_flavor}-pybeam
+BuildRequires:  %{python_flavor}-pyenchant
+BuildRequires:  %{python_flavor}-pytest
+BuildRequires:  %{python_flavor}-pytest-xdist
+BuildRequires:  %{python_flavor}-python-magic
+BuildRequires:  %{python_flavor}-pyxdg
+BuildRequires:  %{python_flavor}-rpm
+BuildRequires:  %{python_flavor}-tomli-w
+BuildRequires:  %{python_flavor}-zstandard
 BuildRequires:  appstream-glib
 BuildRequires:  binutils
 BuildRequires:  checkbashisms
@@ -44,22 +57,20 @@ BuildRequires:  dash
 BuildRequires:  desktop-file-utils
 BuildRequires:  myspell-cs_CZ
 BuildRequires:  myspell-en_US
-BuildRequires:  python3-pybeam
-BuildRequires:  python3-pyenchant
-BuildRequires:  python3-pytest
-BuildRequires:  python3-pytest-xdist
-BuildRequires:  python3-python-magic
-BuildRequires:  python3-pyxdg
-BuildRequires:  python3-rpm
-BuildRequires:  python3-tomli-w
-BuildRequires:  python3-zstandard
 BuildRequires:  xz
-BuildRequires:  (python3-tomli if python3-base < 3.11)
+BuildRequires:  (%{python_flavor}-tomli if %{python_flavor}-base < 3.11)
 %ifarch x86_64
 BuildRequires:  glibc-32bit
 %endif
+%else
+#!BuildIgnore: rpmlint-mini
 %endif
 %if "%{flavor}" == ""
+Requires:       %{python_flavor}-pybeam
+Requires:       %{python_flavor}-pyenchant
+Requires:       %{python_flavor}-python-magic
+Requires:       %{python_flavor}-pyxdg
+Requires:       %{python_flavor}-rpm
 Requires:       appstream-glib
 Requires:       bash
 Requires:       binutils
@@ -70,16 +81,11 @@ Requires:       desktop-file-utils
 Requires:       file
 Requires:       findutils
 Requires:       myspell-en_US
-Requires:       python3-pybeam
-Requires:       python3-pyenchant
-Requires:       python3-python-magic
-Requires:       python3-pyxdg
-Requires:       python3-rpm
-%if 0%{?python3_version_nodots} < 311
-Requires:       python3-tomli
+%if 0%{?%{python_flavor}_version_nodots} < 311
+Requires:       %{python_flavor}-tomli
 %endif
-Requires:       python3-tomli-w
-Requires:       python3-zstandard
+Requires:       %{python_flavor}-tomli-w
+Requires:       %{python_flavor}-zstandard
 Requires:       rpm-build
 %endif
 
@@ -92,7 +98,7 @@ source packages can be checked.
 
 %build
 %if "%{flavor}" != "strict"
-%python3_pyproject_wheel
+%{expand:%{%{python_flavor}_pyproject_wheel}}
 %endif
 
 %install
@@ -102,15 +108,15 @@ install -m644 configs/openSUSE/scoring-s
 %endif
 
 %if "%{flavor}" == ""
-%python3_pyproject_install
-fdupes %{buildroot}%{python3_sitelib}
+%{expand:%{%{python_flavor}_pyproject_install}}
+fdupes %{buildroot}%{expand %{python_flavor}}_sitelib}
 install -m644 configs/openSUSE/* %{buildroot}%{_sysconfdir}/xdg/rpmlint
 rm %{buildroot}%{_sysconfdir}/xdg/rpmlint/scoring-strict.override.toml
 %endif
 
 %if "%{flavor}" == "test"
 %check
-python3 -m pytest
+%{my_python} -m pytest
 %endif
 
 %files
@@ -119,7 +125,7 @@ python3 -m pytest
 %doc README*
 %{_bindir}/rpmlint
 %{_bindir}/rpmdiff
-%{python3_sitelib}/rpmlint*
+%{expand:%{%{python_flavor}_sitelib}}/rpmlint*
 %dir %{_sysconfdir}/xdg/rpmlint
 %config %{_sysconfdir}/xdg/rpmlint/*
 
openSUSE Build Service is sponsored by
OSZAR »