Patch from upstream for traceback when people use this with python2 and
python3 in the same directory
This commit is contained in:
parent
3e6d7d38a4
commit
2f2365705f
|
@ -0,0 +1,19 @@
|
|||
# HG changeset patch
|
||||
# User Ned Batchelder <ned@nedbatchelder.com>
|
||||
# Date 1349312975 14400
|
||||
# Node ID 16020b834643bb8b9953b8d4bcc09691deb549b9
|
||||
# Parent 70e174f7312c87101b0b5be7ec7dd1acf7869f12
|
||||
Fix #193: The status.dat file written by py2 can't be read by py3
|
||||
|
||||
diff -r 70e174f7312c87101b0b5be7ec7dd1acf7869f12 -r 16020b834643bb8b9953b8d4bcc09691deb549b9 coverage/html.py
|
||||
--- a/coverage/html.py Wed Oct 03 07:48:04 2012 -0400
|
||||
+++ b/coverage/html.py Wed Oct 03 21:09:35 2012 -0400
|
||||
@@ -281,7 +281,7 @@
|
||||
status = pickle.load(fstatus)
|
||||
finally:
|
||||
fstatus.close()
|
||||
- except IOError:
|
||||
+ except (IOError, ValueError):
|
||||
usable = False
|
||||
else:
|
||||
usable = True
|
|
@ -14,11 +14,12 @@
|
|||
Name: python-coverage
|
||||
Summary: Code coverage testing module for Python
|
||||
Version: 3.5.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: BSD and (MIT or GPLv2)
|
||||
Group: System Environment/Libraries
|
||||
URL: http://nedbatchelder.com/code/modules/coverage.html
|
||||
Source0: http://pypi.python.org/packages/source/c/coverage/coverage-%{version}.tar.gz
|
||||
Patch0: python-coverage-3.5.3-pickle.patch
|
||||
BuildRequires: python-setuptools, python-devel
|
||||
Requires: python-setuptools
|
||||
%if 0%{?with_python3}
|
||||
|
@ -50,6 +51,8 @@ have been executed.
|
|||
%prep
|
||||
%setup -q -n coverage-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
|
||||
find . -type f -exec chmod 0644 \{\} \;
|
||||
sed -i 's/\r//g' README.txt
|
||||
|
||||
|
@ -73,12 +76,12 @@ popd
|
|||
%install
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage
|
||||
popd
|
||||
%endif # if with_python3
|
||||
|
||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||
|
||||
%files
|
||||
%doc README.txt
|
||||
|
@ -95,6 +98,10 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Oct 10 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 3.5.3-2
|
||||
- Patch from upstream for traceback when people use this with python2 and
|
||||
python3 in the same directory
|
||||
|
||||
* Mon Oct 1 2012 Tom Callaway <spot@fedoraproject.org> - 3.5.3-1
|
||||
- update to 3.5.3
|
||||
|
||||
|
|
Loading…
Reference in New Issue