From 11102bc22621c59a2de1df50ae9928bdf5dd0f24 Mon Sep 17 00:00:00 2001 From: fgsch Date: Sat, 29 Dec 2012 18:28:49 +0000 Subject: [PATCH] Update to httplib2 0.7.7. Remove maintainer as per his request. --- www/py-httplib2/Makefile | 21 ++++++++++++------- www/py-httplib2/distinfo | 7 ++----- .../patches/patch-python2_httplib2test_py | 21 +++++++++++++++++++ .../patches/patch-python3_httplib2test_py | 21 +++++++++++++++++++ www/py-httplib2/pkg/PLIST | 15 +++++++++---- 5 files changed, 68 insertions(+), 17 deletions(-) create mode 100644 www/py-httplib2/patches/patch-python2_httplib2test_py create mode 100644 www/py-httplib2/patches/patch-python3_httplib2test_py diff --git a/www/py-httplib2/Makefile b/www/py-httplib2/Makefile index 6195f79aab5..421c0129378 100644 --- a/www/py-httplib2/Makefile +++ b/www/py-httplib2/Makefile @@ -1,18 +1,15 @@ -# $OpenBSD: Makefile,v 1.8 2012/12/03 13:08:08 jasper Exp $ +# $OpenBSD: Makefile,v 1.9 2012/12/29 18:28:49 fgsch Exp $ COMMENT = Python HTTP client library -MODPY_EGG_VERSION = 0.6.0 +MODPY_EGG_VERSION = 0.7.7 DISTNAME = httplib2-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} -REVISION = 2 CATEGORIES = www net HOMEPAGE = http://code.google.com/p/httplib2/ -MAINTAINER = Benoit Chesneau - # MIT PERMIT_PACKAGE_CDROM = Yes PERMIT_PACKAGE_FTP = Yes @@ -23,11 +20,19 @@ MASTER_SITES = http://httplib2.googlecode.com/files/ MODULES = lang/python +MODPY_SETUPTOOLS = Yes + +MODPY_BADEGGS = python${MODPY_MAJOR_VERSION}/httplib2 + +pre-patch: + @perl -pi -e 's|\r\n|\n|g' ${WRKDIST}/python3/httplib2test.py + post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-httplib2 - ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/py-httplib2 + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/${MODPY_PY_PREFIX}httplib2 + ${INSTALL_DATA} ${WRKSRC}/README \ + ${PREFIX}/share/doc/${MODPY_PY_PREFIX}httplib2 do-regress: - ${MODPY_BIN} ${WRKSRC}/lib/httplib2/iri2uri.py + ${MODPY_BIN} ${WRKSRC}/python${MODPY_MAJOR_VERSION}/httplib2test.py .include diff --git a/www/py-httplib2/distinfo b/www/py-httplib2/distinfo index 6b5275a5f55..39d7bc67dac 100644 --- a/www/py-httplib2/distinfo +++ b/www/py-httplib2/distinfo @@ -1,5 +1,2 @@ -MD5 (httplib2-0.6.0.tar.gz) = BPc+KWwCyc1xUdszomcbfA== -RMD160 (httplib2-0.6.0.tar.gz) = v7p6WGvTsiNMjMvxXyzFZAvU9mQ= -SHA1 (httplib2-0.6.0.tar.gz) = mVNEsnBIJswNYaJm6ZWzKNkkRaU= -SHA256 (httplib2-0.6.0.tar.gz) = WN4Gjlr1ZhxWaruHGnUTPMgpfmRz/z8V6YB51X2jl4w= -SIZE (httplib2-0.6.0.tar.gz) = 53800 +SHA256 (httplib2-0.7.7.tar.gz) = LizhgJLDLR7FT4pEfhTjNYXjDyQLiDv+7KZfErO8+vY= +SIZE (httplib2-0.7.7.tar.gz) = 144020 diff --git a/www/py-httplib2/patches/patch-python2_httplib2test_py b/www/py-httplib2/patches/patch-python2_httplib2test_py new file mode 100644 index 00000000000..055d443b5cd --- /dev/null +++ b/www/py-httplib2/patches/patch-python2_httplib2test_py @@ -0,0 +1,21 @@ +$OpenBSD: patch-python2_httplib2test_py,v 1.1 2012/12/29 18:28:49 fgsch Exp $ +--- python2/httplib2test.py.orig Fri Nov 16 13:20:22 2012 ++++ python2/httplib2test.py Sun Dec 23 16:04:06 2012 +@@ -40,7 +40,7 @@ if not hasattr(unittest.TestCase, 'assertTrue'): + # The test resources base uri + base = 'http://bitworking.org/projects/httplib2/test/' + #base = 'http://localhost/projects/httplib2/test/' +-cacheDirName = ".cache" ++cacheDirName = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".cache") + + + class CredentialsTest(unittest.TestCase): +@@ -247,7 +247,7 @@ class HttpTest(unittest.TestCase): + # since httplib blocks response.read() for HEAD requests. + # Oddly enough this doesn't appear as a problem when doing HEAD requests + # against Apache servers. +- uri = "http://www.google.com/" ++ uri = "http://www.google.co.uk/" + (response, content) = self.http.request(uri, "HEAD") + self.assertEqual(response.status, 200) + self.assertEqual(content, "") diff --git a/www/py-httplib2/patches/patch-python3_httplib2test_py b/www/py-httplib2/patches/patch-python3_httplib2test_py new file mode 100644 index 00000000000..d5ee3492ad7 --- /dev/null +++ b/www/py-httplib2/patches/patch-python3_httplib2test_py @@ -0,0 +1,21 @@ +$OpenBSD: patch-python3_httplib2test_py,v 1.1 2012/12/29 18:28:49 fgsch Exp $ +--- python3/httplib2test.py.orig Sun Dec 23 16:05:17 2012 ++++ python3/httplib2test.py Sun Dec 23 16:05:51 2012 +@@ -30,7 +30,7 @@ import urllib.parse + # The test resources base uri + base = 'http://bitworking.org/projects/httplib2/test/' + #base = 'http://localhost/projects/httplib2/test/' +-cacheDirName = ".cache" ++cacheDirName = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".cache") + + + class CredentialsTest(unittest.TestCase): +@@ -227,7 +227,7 @@ class HttpTest(unittest.TestCase): + # since httplib blocks response.read() for HEAD requests. + # Oddly enough this doesn't appear as a problem when doing HEAD requests + # against Apache servers. +- uri = "http://www.google.com/" ++ uri = "http://www.google.co.uk/" + (response, content) = self.http.request(uri, "HEAD") + self.assertEqual(response.status, 200) + self.assertEqual(content, b"") diff --git a/www/py-httplib2/pkg/PLIST b/www/py-httplib2/pkg/PLIST index 7195f3301c3..59ce12823ef 100644 --- a/www/py-httplib2/pkg/PLIST +++ b/www/py-httplib2/pkg/PLIST @@ -1,9 +1,16 @@ -@comment $OpenBSD: PLIST,v 1.2 2010/11/23 15:08:16 fgsch Exp $ +@comment $OpenBSD: PLIST,v 1.3 2012/12/29 18:28:49 fgsch Exp $ lib/python${MODPY_VERSION}/site-packages/httplib2/ -lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info +lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/ +lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO +lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt +lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt +lib/python${MODPY_VERSION}/site-packages/httplib2-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt lib/python${MODPY_VERSION}/site-packages/httplib2/__init__.py lib/python${MODPY_VERSION}/site-packages/httplib2/__init__.pyc +lib/python${MODPY_VERSION}/site-packages/httplib2/cacerts.txt lib/python${MODPY_VERSION}/site-packages/httplib2/iri2uri.py lib/python${MODPY_VERSION}/site-packages/httplib2/iri2uri.pyc -share/doc/py-httplib2/ -share/doc/py-httplib2/README +lib/python${MODPY_VERSION}/site-packages/httplib2/socks.py +lib/python${MODPY_VERSION}/site-packages/httplib2/socks.pyc +share/doc/${MODPY_PY_PREFIX}httplib2/ +share/doc/${MODPY_PY_PREFIX}httplib2/README