aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-11 11:27:57 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-11 11:27:57 +0200
commit3812d61a4be11fdcf9f2bdb013cc6e963a6b6bf8 (patch)
tree8aa1b9bd8aba1c3b0fa27b34e10e6b0b6c5f4934
parent9a8f1dff1ecf113de937f0700093277a4a61ee85 (diff)
osmocom-bb: python3
-rw-r--r--rpm-local/spec/osmocom-bb/osmocom-bb.spec7
1 files 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