From 257a840064a1822a266e6bcbf37ba7227c196242 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 21 May 2024 16:16:02 +0200 Subject: [PATCH] Remove dependency on /usr/bin/python3 using %python3_fix_shebang macro (bsc#1212476) Upstreams the following OBS request: https://build.opensuse.org/request/show/1160115/changes --- contrib/osc.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/osc.spec b/contrib/osc.spec index d26c04b1..83ccb376 100644 --- a/contrib/osc.spec +++ b/contrib/osc.spec @@ -30,6 +30,11 @@ %bcond_with fdupes %endif +# the macro exists only on openSUSE based distros +%if %{undefined python3_fix_shebang} +%define python3_fix_shebang %nil +%endif + %define argparse_manpage_pkg argparse-manpage %define obs_build_pkg obs-build %define ssh_add_pkg openssh-clients @@ -184,6 +189,8 @@ install -Dm0644 oscrc.5 %{buildroot}%{_mandir}/man5/oscrc.5 %fdupes %buildroot %endif +%python3_fix_shebang + %check %{use_python} setup.py test