From 547f911f28c2d2e74112f4547c1ee03e61bc676c Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Thu, 22 Aug 2024 12:21:38 +0200 Subject: [PATCH] remove dependency on /usr/bin/python3 --- salt/salt.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/salt/salt.spec b/salt/salt.spec index 339e328..aa5a680 100644 --- a/salt/salt.spec +++ b/salt/salt.spec @@ -996,7 +996,6 @@ cp -a conf %{buildroot}%{python3_sitelib}/salt-testsuite/ %if 0%{?suse_version} install -Dd -m 0750 %{buildroot}%{_prefix}/lib/zypp/plugins/commit %{__install} scripts/suse/zypper/plugins/commit/zyppnotify %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify -sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!/usr/bin/python3=' %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify %endif # Install Yum plugins only on RH machines @@ -1101,6 +1100,18 @@ install -Dpm 0640 conf/suse/standalone-formulas-configuration.conf %{buildroot}% %fdupes %{buildroot}%{python3_sitelib} %endif +%python3_fix_shebang +%if %{suse_version} >= 1600 +%python3_fix_shebang_path salt/ext/tornado/* +%python3_fix_shebang_path salt/ext/tornado/platform/* +%python3_fix_shebang_path salt/ext/tornado/test/* +%python3_fix_shebang_path salt/ext/vsan/* +%python3_fix_shebang_path salt/ext/modules/* +%python3_fix_shebang_path salt/netapi/rest_cherrypy/* +%python3_fix_shebang_path salt/pillar/* +%python3_fix_shebang_path %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify +%endif +%python3_compile %endif %if "%{flavor}" != "testsuite"