From da333b832a42537c2d9f48502863fe80d6f09ea926f2528a5388a387d17d6343 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 6 Dec 2018 17:53:45 +0000 Subject: [PATCH] Fix build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyserial?expand=0&rev=26 --- python-pyserial.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python-pyserial.spec b/python-pyserial.spec index 581a138..d2efb68 100644 --- a/python-pyserial.spec +++ b/python-pyserial.spec @@ -50,15 +50,13 @@ Documentation, examples, and help files for %{name}. %prep %setup -q -n pyserial-%{version} -sed -i "s|^#\!\/usr\/bin\/env python$||" serial/{serialposix,__init__}.py # Fix non-executable scripts -sed -i "s/\r//" examples/port_publisher.py # Fix EOL encoding -find examples -name '*.py' -exec sed -i "s|^#!%{_bindir}/env python$|#!python3|" {} \; -find examples -name '*.py' -exec sed -i "s|^#! %{_bindir}/env python$|#!python3|" {} \; -find examples -name '*.py' -exec sed -i "s|^#! python$|#!python3|" {} \; +sed -i "s|^#!\/usr\/bin\/env python$||" serial/{serialposix,__init__}.py # Fix non-executable scripts +sed -i -e "s/\r//" examples/port_publisher.py # Fix EOL encoding %build %python_build make %{?_smp_mflags} -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation +sed -i -e "1{s|^#![[:spaces:]]*\/.*bin.*$|#!%{_bindir}/python3|}" examples/*.py %install %python_install