diff --git a/python-pyserial.changes b/python-pyserial.changes index b295127..ae3878a 100644 --- a/python-pyserial.changes +++ b/python-pyserial.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 15 06:44:21 UTC 2019 - John Vandenberg + +- Remove unnecessary Windows and OSX modules from runtime package +- Remove Mono and Java CLI modules from runtime package +- Activate test suite +- Fix fdupes, hashbangs and executable bits +- Remove non-break-space in python-pyserial.changes with normal space + ------------------------------------------------------------------- Tue Dec 4 12:52:50 UTC 2018 - Matej Cepl @@ -259,7 +268,7 @@ Sun Nov 24 21:04:55 UTC 2013 - p.drouand@gmail.com + [Bug pyserial:141] open: Pass errno from IOError to SerialException + [Bug pyserial:125] Undefined 'base' on list_ports_posix.py, function usb_lsusb + [Bug pyserial:151] Serial.write() without a timeout uses 100% CPU on POSIX - + [Patch pyserial:30] [PATCH 1/1] serial.Serial() should not raise IOError. + + [Patch pyserial:30] [PATCH 1/1] serial.Serial() should not raise IOError + [Bug 3444941] ctypes.WinError() unicode error + [Bug 3550043] on Windows in tools global name 'GetLastError' is not defined + [Bug pyserial:146] flush() does nothing in windows (despite docs) diff --git a/python-pyserial.spec b/python-pyserial.spec index c6bb27d..f774c91 100644 --- a/python-pyserial.spec +++ b/python-pyserial.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyserial # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -50,8 +50,23 @@ 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 -e "s/\r//" examples/port_publisher.py # Fix EOL encoding + +# Unnecessary +rm serial/tools/list_ports_windows.py \ + serial/tools/list_ports_osx.py \ + serial/win32.py \ + serial/serialwin32.py + +# Requires .Net/IronPython, and especially System.IO.Ports which is troublesome +rm serial/serialcli.py + +# Requires Jython with JavaComm +rm serial/serialjava.py + +find serial -type f -not -name 'miniterm.py' -exec sed -i '1{/#!/d}' {} + +find serial -type f -not -name 'miniterm.py' -exec chmod a-x {} + + +touch test/__init__.py %build %python_build @@ -65,25 +80,13 @@ 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|^#!%{_bindir}/env python$|#!%{__$python}|" serial/tools/*.py -sed -i "s|^#!%{_bindir}/env python3$|#!%{__$python}|" serial/threaded/__init__.py -sed -i "s|^#!%{_bindir}/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 +%{python_expand sed -i '1{/#!/d}' %{buildroot}%{$python_sitelib}/serial/tools/miniterm.py +%fdupes %{buildroot}%{$python_sitelib} } +%check +%python_exec test/run_all_tests.py + %post %python_install_alternative miniterm