From f8df8ddcf6770a25578a657504c52467af2cb55ce75c04ea96aae997fa0b80ab Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 6 Aug 2017 18:31:09 +0000 Subject: [PATCH] Accepting request 514816 from home:TheBlackCat:branches:devel:languages:python - Update to version 3.4 - Fix shebangs OBS-URL: https://build.opensuse.org/request/show/514816 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyserial?expand=0&rev=21 --- pyserial-3.3.tar.gz | 3 --- pyserial-3.4.tar.gz | 3 +++ python-pyserial.changes | 21 +++++++++++++++++++++ python-pyserial.spec | 27 ++++++++++++++++++++++++--- 4 files changed, 48 insertions(+), 6 deletions(-) delete mode 100644 pyserial-3.3.tar.gz create mode 100644 pyserial-3.4.tar.gz diff --git a/pyserial-3.3.tar.gz b/pyserial-3.3.tar.gz deleted file mode 100644 index 800b2ea..0000000 --- a/pyserial-3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2949cddffc2b05683065a3cd2345114b1a49b08df8cb843d69ba99dc3e19edc2 -size 149032 diff --git a/pyserial-3.4.tar.gz b/pyserial-3.4.tar.gz new file mode 100644 index 0000000..296632e --- /dev/null +++ b/pyserial-3.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627 +size 151657 diff --git a/python-pyserial.changes b/python-pyserial.changes index 24cecce..a2e42f8 100644 --- a/python-pyserial.changes +++ b/python-pyserial.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Sun Aug 6 18:07:57 UTC 2017 - toddrme2178@gmail.com + +- Update to version 3.4 + + Improvements: + * miniterm: suspend function (temporarily release port, :kbd:`Ctrl-T s`) + * [#240] context manager automatically opens port on ``__enter__`` + * [#141] list_ports: add interface number to location string + * [#225] protocol_socket: Retry if ``BlockingIOError`` occurs in + ``reset_input_buffer``. + + Bugfixes: + * [#153] list_ports: option to include symlinked devices + * [#237] list_ports: workaround for special characters in port names + + Bugfixes (posix): + * allow calling cancel functions w/o error if port is closed + * [#220] protocol_socket: sync error handling with posix version + * [#227] posix: ignore more blocking errors and EINTR, timeout only + applies to blocking I/O + * [#228] fix: port_publisher typo +- Fix shebangs + ------------------------------------------------------------------- Wed Jun 21 13:47:02 UTC 2017 - bwiedemann@suse.com diff --git a/python-pyserial.spec b/python-pyserial.spec index 51cbf27..6e375bf 100644 --- a/python-pyserial.spec +++ b/python-pyserial.spec @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyserial -Version: 3.3 +Version: 3.4 Release: 0 Url: https://github.com/pyserial/pyserial Summary: Python Serial Port Extension @@ -55,20 +55,41 @@ Documentation, examples, and help files for %{name}. %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|#!/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 make -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation + %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} - mv %{buildroot}%{_bindir}/miniterm.py %{buildroot}%{_bindir}/miniterm %python_clone -a %{buildroot}%{_bindir}/miniterm 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 +chmod a+x serial/tools/*.py +chmod a-x serial/tools/__init__.py +chmod a-x serial/tools/list_ports_windows.py +chmod a-x serial/tools/hexlify_codec.py +chmod a+x serial/threaded/__init__.py +chmod a+x serial/rs485.py +# Deduplicating files can generate a RPMLINT warning for pyc mtime +$python -m compileall -d %{$python_sitelib} serial/ +$python -O -m compileall -d %{$python_sitelib} serial/ +%fdupes . +popd +} + %post %python_install_alternative miniterm