New upstream version 2.7

This commit is contained in:
Paul P. Komkoff 2015-03-08 19:47:30 +03:00
parent 0127ac195d
commit 97e8b8c035
4 changed files with 7 additions and 47 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
pyserial-2.4.tar.gz
/pyserial-2.5.tar.gz
/pyserial-2.6.tar.gz
/pyserial-2.7.tar.gz

View File

@ -1,42 +0,0 @@
Index: pyserial/serial/serialposix.py
===================================================================
--- pyserial/serial/serialposix.py (revision 455)
+++ pyserial/serial/serialposix.py (working copy)
@@ -36,26 +36,25 @@
def device(port):
return '/dev/ttyS%d' % port
- ASYNC_SPD_MASK = 0x1030
- ASYNC_SPD_CUST = 0x0030
+ TCGETS2 = 0x802C542A
+ TCSETS2 = 0x402C542B
+ BOTHER = 0o010000
def set_special_baudrate(port, baudrate):
+ # right size is 44 on x86_64, allow for some growth
import array
- buf = array.array('i', [0] * 32)
+ buf = array.array('i', [0] * 64)
# get serial_struct
- FCNTL.ioctl(port.fd, TERMIOS.TIOCGSERIAL, buf)
+ FCNTL.ioctl(port.fd, TCGETS2, buf)
+ # set custom speed
+ buf[2] &= ~TERMIOS.CBAUD
+ buf[2] |= BOTHER
+ buf[9] = buf[10] = baudrate
- # set custom divisor
- buf[6] = buf[7] / baudrate
-
- # update flags
- buf[4] &= ~ASYNC_SPD_MASK
- buf[4] |= ASYNC_SPD_CUST
-
# set serial_struct
try:
- res = FCNTL.ioctl(port.fd, TERMIOS.TIOCSSERIAL, buf)
+ res = FCNTL.ioctl(port.fd, TCSETS2, buf)
except IOError:
raise ValueError('Failed to set custom baud rate: %r' % baudrate)

View File

@ -1,9 +1,8 @@
Summary: Python serial port access library
Name: pyserial
Version: 2.6
Release: 9%{?dist}
Version: 2.7
Release: 1%{?dist}
Source0: http://easynews.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
Patch0: pyserial-speed.patch
License: Python
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -31,7 +30,6 @@ the appropriate backend.
%prep
export UNZIP="-aa"
%setup -q
%patch0 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -62,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT
%{python3_sitelib}/*
%changelog
* Sun Mar 08 2015 Paul Komkoff <i@stingr.net> 2.7-1
- new upstream version
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1 +1 @@
cde799970b7c1ce1f7d6e9ceebe64c98 pyserial-2.6.tar.gz
794506184df83ef2290de0d18803dd11 pyserial-2.7.tar.gz