14
0

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
This commit is contained in:
Todd R
2017-08-07 16:32:50 +00:00
committed by Git OBS Bridge
parent f8df8ddcf6
commit 204843e4e8
2 changed files with 13 additions and 8 deletions

View File

@@ -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

View File

@@ -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