File project.diff of Package libdnf
--- libdnf.spec.orig
+++ libdnf.spec
@@ -1,7 +1,7 @@
#
# spec file for package libdnf
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2023 Neal Gompa <ngompa@opensuse.org>.
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
@@ -105,16 +105,16 @@ Requires: libmodulemd2%{?_isa} >=
This library provides an interface atop libsolv, and a high-level
RPM package manager library interface.
-%package -n python3-%{name}
+%package -n %{primary_python}-%{name}
Summary: Python 3 bindings for the libdnf library
Group: Development/Libraries/Python
Requires: %{libname}%{?_isa} = %{version}-%{release}
-BuildRequires: python3-Sphinx
-BuildRequires: python3-devel
+BuildRequires: %{primary_python}-Sphinx
+BuildRequires: %{primary_python}-devel
BuildRequires: swig >= %{swig_version}
-Conflicts: python3-dnf < %{dnf_conflict}
+Conflicts: %{primary_python}-dnf < %{dnf_conflict}
-%description -n python3-%{name}
+%description -n %{primary_python}-%{name}
This package provides the Python 3 bindings for the libdnf library.
%package -n %{devname}
@@ -129,24 +129,24 @@ that use %{name}.
%package -n hawkey-man
Summary: Documentation for the hawkey Python bindings
Group: Documentation/Man
-BuildRequires: python3-Sphinx
+BuildRequires: %{primary_python}-Sphinx
BuildArch: noarch
%description -n hawkey-man
This package provides the man pages for the hawkey Python bindings.
-%package -n python3-hawkey
+%package -n %{primary_python}-hawkey
Summary: Python 3 bindings for the hawkey interface
Group: Development/Libraries/Python
-BuildRequires: python3-devel
+BuildRequires: %{primary_python}-devel
Requires: %{libname}%{?_isa} = %{version}-%{release}
-Requires: python3-%{name}%{?_isa} = %{version}-%{release}
+Requires: %{primary_python}-%{name}%{?_isa} = %{version}-%{release}
Recommends: hawkey-man = %{version}-%{release}
-Conflicts: python3-dnf < %{dnf_conflict}
+Conflicts: %{primary_python}-dnf < %{dnf_conflict}
# Python 2 subpackage has been dropped
Obsoletes: python2-hawkey < 0.24.1
-%description -n python3-hawkey
+%description -n %{primary_python}-hawkey
This package provides the Python 3 bindings for %{name} through
the hawkey interface.
@@ -171,10 +171,10 @@ repository configuration files set for Z
%autosetup -p1
# Fix sphinx-build run...
-sed -e "s/sphinx-build-3/sphinx-build-%{python3_version}/" -i docs/hawkey/CMakeLists.txt
+sed -e "s/sphinx-build-3/sphinx-build-%{python_version}/" -i docs/hawkey/CMakeLists.txt
%build
-%cmake -DPYTHON_DESIRED:FILEPATH=%{__python3} %{!?with_valgrind:-DDISABLE_VALGRIND=1}
+%cmake -DPYTHON_DESIRED:FILEPATH=/usr/bin/python%{python_bin_suffix} %{!?with_valgrind:-DDISABLE_VALGRIND=1}
%cmake_build
%if %{with check}
@@ -206,7 +206,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/zypp
ln -sr %{buildroot}%{_sysconfdir}/zypp/repos.d %{buildroot}%{_sysconfdir}/distro.repos.d
%python_compileall
-%fdupes %{buildroot}%{python3_sitearch}
+%fdupes %{buildroot}%{python_sitearch}
%ldconfig_scriptlets -n %{libname}
@@ -218,10 +218,10 @@ ln -sr %{buildroot}%{_sysconfdir}/zypp/r
%dir %{_libdir}/%{name}/plugins
%{_libdir}/%{name}/plugins/README
-%files -n python3-%{name}
+%files -n %{primary_python}-%{name}
%license COPYING
-%{python3_sitearch}/%{name}/
-%{python3_sitearch}/%{name}-%{version}.dist-info/
+%{python_sitearch}/%{name}/
+%{python_sitearch}/%{name}-%{version}.dist-info/
%files -n %{devname}
%license COPYING
@@ -234,9 +234,9 @@ ln -sr %{buildroot}%{_sysconfdir}/zypp/r
%license COPYING
%{_mandir}/man3/hawkey.3*
-%files -n python3-hawkey
+%files -n %{primary_python}-hawkey
%license COPYING
-%{python3_sitearch}/hawkey/
+%{python_sitearch}/hawkey/
%files repo-config-zypp
%license COPYING