From 3812d61a4be11fdcf9f2bdb013cc6e963a6b6bf8 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 11 May 2020 11:27:57 +0200 Subject: osmocom-bb: python3 Change-Id: Ibb902c8b721be75e0f1bfb2000c3f58b3d5a263f --- rpm-local/spec/osmocom-bb/osmocom-bb.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpm-local/spec/osmocom-bb/osmocom-bb.spec b/rpm-local/spec/osmocom-bb/osmocom-bb.spec index 0a1bb3e..da4f380 100644 --- a/rpm-local/spec/osmocom-bb/osmocom-bb.spec +++ b/rpm-local/spec/osmocom-bb/osmocom-bb.spec @@ -43,7 +43,7 @@ BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: libtool BuildRequires: pkgconfig -BuildRequires: python +BuildRequires: python3 # SLES does not provide gpsd-devel, so build without gps-support on those systems %if 0%{?is_opensuse} BuildRequires: pkgconfig(libgps) @@ -82,8 +82,9 @@ phones. %setup -q %patch2 -p1 %patch3 -p1 -# HACK: Don't use /usr/bin/env as an interpreter -sed -i 's|#!/usr/bin/env python2|#!/usr/bin/python2|g' src/target/trx_toolkit/*.py + +# fix python shebangs +find . -type f -name "*.py" -exec sed -i '/^#!/ s|.*|#!%{__python3}|' {} \; %build echo "%{version}" >src/host/osmocon/.tarball-version -- cgit v1.2.3