[dev-python/httplib2] Add patch for issue #96

This commit is contained in:
Ian Whyman
2011-06-09 10:26:04 +01:00
parent c02db2c1e4
commit 2f6813a6b3
4 changed files with 74 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
AUX httplib2-0.6.0+0cff83696d-fix-no-attribute-makefile.patch 1060 RMD160 45eba1852b60e54372fe501f22384e5f4af8dcc6 SHA1 d648c266129956d8fd0d74dcf039126e8971cfea SHA256 8c8243faae0e7d38bf345eb2904b571bec04d5db8d09126a911a82406d6f1545
DIST httplib2-0.6.0.tar.gz 53800 RMD160 bfba7a586bd3b2234c8ccbf15f2cc5640bd4f664 SHA1 995344b2704826cc0d61a266e995b328d92445a5 SHA256 58de068e5af5661c566abb871a75133cc8297e6473ff3f15e98079d57da3978c
EBUILD httplib2-0.6.0.ebuild 934 RMD160 261e872dfd4cee17a4966f1183862b70b6fc35e9 SHA1 aae4f3aa9bbe4fdb61b7ff4b3810f78b059b165d SHA256 c496fec823b2433a6fa84c0e2132263c1d677ba96df47cec4ad25686a751a8f7
MISC metadata.xml 159 RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f SHA1 c8e604d56dae898258b5254d78cfeac0b981e288 SHA256 9f01104d3484792496faff4805eed0ecea2352a897151f3397d49a13800037b4
@@ -0,0 +1,24 @@
diff -r -U4 httplib2-0.6.0/python2/httplib2/__init__.py httplib2-0.6.0/python2/httplib2/__init__.py
--- httplib2-0.6.0/python2/httplib2/__init__.py 2010-12-18 17:05:28.000000000 +0000
+++ httplib2-0.6.0/python2/httplib2/__init__.py 2010-12-18 17:04:44.000000000 +0000
@@ -868,8 +868,20 @@
raise
except httplib.HTTPException:
# Just because the server closed the connection doesn't apparently mean
# that the server didn't send a response.
+ if conn.sock is None:
+ if i == 0:
+ conn.close()
+ conn.connect()
+ continue
+ else:
+ conn.close()
+ raise
+ if i == 0:
+ conn.close()
+ conn.connect()
+ continue
pass
try:
response = conn.getresponse()
except (socket.error, httplib.HTTPException):
@@ -0,0 +1,41 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/httplib2/httplib2-0.6.0.ebuild,v 1.10 2010/10/09 10:38:53 ssuominen Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
inherit eutils distutils
DESCRIPTION="A comprehensive HTTP client library"
HOMEPAGE="http://code.google.com/p/httplib2/ http://pypi.python.org/pypi/httplib2"
SRC_URI="http://httplib2.googlecode.com/files/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86"
IUSE=""
DEPEND=""
RDEPEND=""
src_prepare() {
epatch "${FILESDIR}/${P}+0cff83696d-fix-no-attribute-makefile.patch"
distutils_src_prepare
}
src_install() {
distutils_src_install
dodoc README
newdoc python3/README README-python3
}
src_test() {
testing() {
cd "$S/python${PYTHON_ABI:0:1}"
"$(PYTHON)" httplib2test.py
cd ../..
}
python_execute_function testing
}
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>python</herd>
</pkgmetadata>