File project.diff of Package obs-service-set_version

--- obs-service-set_version.spec.orig
+++ obs-service-set_version.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package obs-service-set_version
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,13 +16,23 @@
 #
 
 
-%if 0%{?rhel} || 0%{?amzn} || ( 0%{?suse_version} && 0%{?suse_version} <= 1315 )
+%if 0%{?rhel} || 0%{?amzn} || ( 0%{?suse_version} && 0%{?suse_version} <= 1500 )
 %bcond_with obs_scm_testsuite
 %else
 %bcond_without obs_scm_testsuite
 %endif
 %define service set_version
 
+%if 0%{?suse_version} > 1315  || 0%{?fedora_version}  || 0%{?rhel} >= 8 || 0%{?mageia} >= 8
+%ifarch %ix86
+%define use_python python
+%else
+%define use_python python3
+%endif
+%else
+%define use_python python
+%endif
+
 Name:           obs-service-%{service}
 Version:        0.6.6
 Release:        0
@@ -32,19 +42,21 @@ Group:          Development/Tools/Buildi
 URL:            https://github.com/openSUSE/obs-service-%{service}
 Source:         %{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildArch:      noarch
+# BuildArch:      noarch
 
 %if %{with obs_scm_testsuite}
-BuildRequires:  python3-ddt
-BuildRequires:  python3-flake8
-BuildRequires:  python3-packaging
+BuildRequires:  %{use_python}-ddt
+BuildRequires:  %{use_python}-flake8
+BuildRequires:  %{use_python}-packaging
 %endif
 
-%if !0%{?suse_version}
-Requires:       python3
-%endif
 %if 0%{?suse_version}
-Recommends:     python3-packaging
+%if %{use_python} == "python3"
+Requires:       python3-base
+%else
+Requires:       python
+%endif
+Recommends:     %{use_python}-packaging
 %endif
 
 %description
@@ -57,9 +69,11 @@ a given version or to the existing files
 %setup -q
 
 %build
+sed -i -e "1 s,#!/usr/bin/python$,#!/usr/bin/%{use_python}," set_version
+
 %if %{with obs_scm_testsuite}
 %check
-make test PYTHON=python3
+make test PYTHON=%{use_python}
 %endif
 
 %install
openSUSE Build Service is sponsored by