From 204843e4e8931f485b830893b4fc738cc2643e9b72a62e214bdd0d7dff46de61 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 7 Aug 2017 16:32:50 +0000 Subject: [PATCH] Accepting request 515044 from home:TheBlackCat:branches:devel:languages:python - Further fix shebangs OBS-URL: https://build.opensuse.org/request/show/515044 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyserial?expand=0&rev=22 --- python-pyserial.changes | 5 +++++ python-pyserial.spec | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/python-pyserial.changes b/python-pyserial.changes index a2e42f8..0c83dc3 100644 --- a/python-pyserial.changes +++ b/python-pyserial.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Aug 7 16:32:29 UTC 2017 - toddrme2178@gmail.com + +- Further fix shebangs + ------------------------------------------------------------------- Sun Aug 6 18:07:57 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pyserial.spec b/python-pyserial.spec index 6e375bf..4d80c74 100644 --- a/python-pyserial.spec +++ b/python-pyserial.spec @@ -53,11 +53,11 @@ 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|^#\!\/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|#!/usr/bin/env python|#!%__python3|" {} \; -find examples -name '*.py' -exec sed -i "s|#! /usr/bin/env python|#!%__python3|" {} \; -find examples -name '*.py' -exec sed -i "s|#! python|#!%__python3|" {} \; +find examples -name '*.py' -exec sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" {} \; +find examples -name '*.py' -exec sed -i "s|^#! /usr/bin/env python$|#!%{__python3}|" {} \; +find examples -name '*.py' -exec sed -i "s|^#! python$|#!%{__python3}|" {} \; %build %python_build @@ -73,10 +73,10 @@ rm documentation/_build/doctrees/environment.pickle %{python_expand pushd %{buildroot}%{$python_sitelib} # Fix wrong-script-interpreter -sed -i "s|#!/usr/bin/env python|#!%__$python|" serial/tools/*.py -sed -i "s|#!/usr/bin/env python|#!%__$python|" serial/threaded/__init__.py -sed -i "s|#!/usr/bin/env python|#!%__$python|" serial/rs485.py -sed -i "s|#! python||#!%__$python|" serial/tools/*.py +sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" serial/tools/*.py +sed -i "s|^#!/usr/bin/env python3$|#!%{__$python}|" serial/threaded/__init__.py +sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" serial/rs485.py +sed -i "s|^#! python$||#!%{__$python}|" serial/tools/*.py chmod a+x serial/tools/*.py chmod a-x serial/tools/__init__.py chmod a-x serial/tools/list_ports_windows.py