summaryrefslogtreecommitdiff
path: root/net/py-google
diff options
context:
space:
mode:
authorrecht <recht>2004-03-03 10:27:17 +0000
committerrecht <recht>2004-03-03 10:27:17 +0000
commit95db2592d81cc2c15a82221d0cd145c391deea95 (patch)
tree8aafb3d61514fd2ebfa2ca3a40992db8a1f03b74 /net/py-google
parent9877de43d6adfd225745cddd25c4b3f0c4fbc2dc (diff)
downloadpkgsrc-95db2592d81cc2c15a82221d0cd145c391deea95.tar.gz
update to 0.6
- use tar.gz instead of zip to avoid extra dependency - use new project homepage - enable install of fallback SOAP library 0.6 of 02/24/2004 - support the latest SOAPpy release, fallback to included version if it's not found, or is a version that's known to be buggy. - epydoc API documentation - quite a bit of refactoring - make some functions and classes that SHOULD be private, actually private - formatting cleanup
Diffstat (limited to 'net/py-google')
-rw-r--r--net/py-google/Makefile13
-rw-r--r--net/py-google/PLIST14
-rw-r--r--net/py-google/distinfo10
-rw-r--r--net/py-google/patches/patch-aa79
-rw-r--r--net/py-google/patches/patch-ab61
-rw-r--r--net/py-google/patches/patch-ac11
-rw-r--r--net/py-google/patches/patch-ad15
7 files changed, 14 insertions, 189 deletions
diff --git a/net/py-google/Makefile b/net/py-google/Makefile
index 5ca5fd9615c..67f7060040b 100644
--- a/net/py-google/Makefile
+++ b/net/py-google/Makefile
@@ -1,23 +1,18 @@
-# $NetBSD: Makefile,v 1.12 2004/01/20 12:22:20 agc Exp $
+# $NetBSD: Makefile,v 1.13 2004/03/03 10:27:17 recht Exp $
#
-DISTNAME= pygoogle-0.5.3
+DISTNAME= pygoogle-0.6
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//}
CATEGORIES= net
-MASTER_SITES= http://diveintomark.org/projects/pygoogle/
-EXTRACT_SUFX= .zip
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pygoogle/}
MAINTAINER= drochner@NetBSD.org
-HOMEPAGE= http://diveintomark.org/projects/pygoogle/
+HOMEPAGE= http://pygoogle.sourceforge.net/
COMMENT= Call the Google web API from Python
-WRKSRC= ${WRKDIR}/pygoogle
PYDISTUTILSPKG= yes
USE_BUILDLINK2= yes
-post-extract:
- ${RM} ${WRKSRC}/soap.py
-
.include "../../net/py-soappy/buildlink2.mk"
.include "../../lang/python/extension.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/py-google/PLIST b/net/py-google/PLIST
index 5a98b201f1e..3e50ad57f47 100644
--- a/net/py-google/PLIST
+++ b/net/py-google/PLIST
@@ -1,15 +1,15 @@
-@comment $NetBSD: PLIST,v 1.2 2003/09/14 16:43:53 recht Exp $
+@comment $NetBSD: PLIST,v 1.3 2004/03/03 10:27:17 recht Exp $
${PYSITELIB}/pygoogle.pth
+${PYSITELIB}/pygoogle/GoogleSOAPFacade.py
+${PYSITELIB}/pygoogle/GoogleSOAPFacade.pyc
+${PYSITELIB}/pygoogle/GoogleSOAPFacade.pyo
+${PYSITELIB}/pygoogle/SOAP.py
+${PYSITELIB}/pygoogle/SOAP.pyc
+${PYSITELIB}/pygoogle/SOAP.pyo
${PYSITELIB}/pygoogle/google.py
${PYSITELIB}/pygoogle/google.pyc
${PYSITELIB}/pygoogle/google.pyo
${PYSITELIB}/pygoogle/googletest.py
${PYSITELIB}/pygoogle/googletest.pyc
${PYSITELIB}/pygoogle/googletest.pyo
-${PYSITELIB}/pygoogle/testclient.py
-${PYSITELIB}/pygoogle/testclient.pyc
-${PYSITELIB}/pygoogle/testclient.pyo
-${PYSITELIB}/pygoogle/testserver.py
-${PYSITELIB}/pygoogle/testserver.pyc
-${PYSITELIB}/pygoogle/testserver.pyo
@dirrm ${PYSITELIB}/pygoogle
diff --git a/net/py-google/distinfo b/net/py-google/distinfo
index ace2d39da76..ebf18bc38df 100644
--- a/net/py-google/distinfo
+++ b/net/py-google/distinfo
@@ -1,8 +1,4 @@
-$NetBSD: distinfo,v 1.4 2003/12/24 11:44:08 recht Exp $
+$NetBSD: distinfo,v 1.5 2004/03/03 10:27:17 recht Exp $
-SHA1 (pygoogle-0.5.3.zip) = 6b4e6c3541bc7c0025c889cc4eca2e8bb7c4a041
-Size (pygoogle-0.5.3.zip) = 35862 bytes
-SHA1 (patch-aa) = b5fbf5df67b3e61e9391cb2f1e5b9b6003f9a007
-SHA1 (patch-ab) = 1c9074efff6444cfd05597534fb57308b07e746e
-SHA1 (patch-ac) = 0938d8035a2371870c31e0eff0104ad3d38f4b62
-SHA1 (patch-ad) = a95eab548482244e31e5199e8e8991ac828275d9
+SHA1 (pygoogle-0.6.tar.gz) = d2a2959b53823ef50b70b0b3304656b584964541
+Size (pygoogle-0.6.tar.gz) = 61276 bytes
diff --git a/net/py-google/patches/patch-aa b/net/py-google/patches/patch-aa
deleted file mode 100644
index 7ea01c1c47f..00000000000
--- a/net/py-google/patches/patch-aa
+++ /dev/null
@@ -1,79 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2003/12/24 11:44:08 recht Exp $
-
---- google.py.orig 2003-06-18 11:17:06.000000000 +0200
-+++ google.py 2003-12-24 12:38:27.000000000 +0100
-@@ -43,7 +43,8 @@
- Erik Max Francis, for the command line interface
- Michael Twomey, for HTTP proxy support"""
-
--import SOAP
-+from SOAPpy import SOAPProxy
-+from SOAPpy import Types
- import os, sys, getopt
-
- LICENSE_KEY = None
-@@ -53,8 +54,8 @@
- class NoLicenseKey(Exception): pass
- _url = 'http://api.google.com/search/beta2'
- _namespace = 'urn:GoogleSearch'
--_false = SOAP.booleanType(0)
--_true = SOAP.booleanType(1)
-+_false = Types.booleanType(0)
-+_true = Types.booleanType(1)
- _googlefile1 = ".googlekey"
- _googlefile2 = "googlekey.txt"
- _licenseLocations = (
-@@ -201,11 +202,11 @@
- class _SearchBase:
- def __init__(self, params):
- for k, v in params.items():
-- if isinstance(v, SOAP.structType):
-- v = v._asdict
-+ if isinstance(v, Types.structType):
-+ v = v._asdict()
- try:
-- if isinstance(v[0], SOAP.structType):
-- v = [node._asdict for node in v]
-+ if isinstance(v[0], Types.structType):
-+ v = [node._asdict() for node in v]
- except:
- pass
- self.__dict__[str(k)] = v
-@@ -303,16 +304,16 @@
- See documentation of these individual classes for list of available attributes
- """
- http_proxy = getProxy(http_proxy)
-- remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
-+ remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
- license_key = getLicense(license_key)
- filter = _marshalBoolean(filter)
- safeSearch = _marshalBoolean(safeSearch)
- data = remoteserver.doGoogleSearch(license_key, q, start, maxResults, filter, restrict,
- safeSearch, language, inputencoding, outputencoding)
-- metadata = data._asdict
-+ metadata = data._asdict()
- del metadata["resultElements"]
- metadata = SearchResultsMetaData(metadata)
-- results = [SearchResult(node._asdict) for node in data.resultElements]
-+ results = [SearchResult(node._asdict()) for node in data.resultElements]
- return SearchReturnValue(metadata, results)
-
- def doGetCachedPage(url, license_key = None, http_proxy = None):
-@@ -330,7 +331,7 @@
- Returns: string, text of cached page
- """
- http_proxy = getProxy(http_proxy)
-- remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
-+ remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
- license_key = getLicense(license_key)
- return remoteserver.doGetCachedPage(license_key, url)
-
-@@ -348,7 +349,7 @@
- Returns: text of suggested replacement, or None
- """
- http_proxy = getProxy(http_proxy)
-- remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
-+ remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
- license_key = getLicense(license_key)
- return remoteserver.doSpellingSuggestion(license_key, phrase)
-
diff --git a/net/py-google/patches/patch-ab b/net/py-google/patches/patch-ab
deleted file mode 100644
index 4272613afd0..00000000000
--- a/net/py-google/patches/patch-ab
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2003/08/11 22:08:34 recht Exp $
-
---- googletest.py.orig 2002-04-18 22:11:18.000000000 +0200
-+++ googletest.py 2003-05-31 12:23:19.000000000 +0200
-@@ -6,7 +6,9 @@
- __copyright__ = "Copyright (c) 2002 Mark Pilgrim"
- __license__ = "Python"
-
--import google, SOAP
-+import google
-+from SOAPpy import SOAPProxy
-+from SOAPpy import Types
- import unittest
- import sys, os
- from StringIO import StringIO
-@@ -251,33 +253,33 @@
- self.assertRaises(google.NoLicenseKey, google.doGoogleSearch, q=self.q)
-
- def testPassInvalidKey(self):
-- """passing invalid license key should fail with SOAP.faultType"""
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q, license_key=self.badkey)
-+ """passing invalid license key should fail with Types.faultType"""
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q, license_key=self.badkey)
-
- def testSetInvalidKey(self):
-- """setting invalid module-level license key should fail with SOAP.faultType"""
-+ """setting invalid module-level license key should fail with Types.faultType"""
- google.setLicense(self.badkey)
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
-
- def testEnvInvalidKey(self):
-- """invalid environment variable license key should fail with SOAP.faultType"""
-+ """invalid environment variable license key should fail with Types.faultType"""
- os.environ[self.envkey] = self.badkey
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
-
- def testHomeDirKey(self):
-- """invalid license key in home directory should fail with SOAP.faultType"""
-+ """invalid license key in home directory should fail with Types.faultType"""
- self.createfile(os.environ["HOME"], self.licensefile, self.badkey)
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
-
- def testCurDirKey(self):
-- """invalid license key in current directory should fail with SOAP.faultType"""
-+ """invalid license key in current directory should fail with Types.faultType"""
- self.createfile("", self.licensefile, self.badkey)
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
-
- def testScriptDirKey(self):
-- """invalid license key in script directory should fail with SOAP.faultType"""
-+ """invalid license key in script directory should fail with Types.faultType"""
- self.createfile(google._getScriptDir(), self.licensefile, self.badkey)
-- self.assertRaises(SOAP.faultType, google.doGoogleSearch, q=self.q)
-+ self.assertRaises(Types.faultType, google.doGoogleSearch, q=self.q)
-
- if __name__ == "__main__":
- unittest.main()
diff --git a/net/py-google/patches/patch-ac b/net/py-google/patches/patch-ac
deleted file mode 100644
index 74e3d6261a7..00000000000
--- a/net/py-google/patches/patch-ac
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2003/08/11 22:08:34 recht Exp $
-
---- testclient.py.orig 2002-04-18 10:36:42.000000000 +0200
-+++ testclient.py 2003-05-31 12:21:04.000000000 +0200
-@@ -1,4 +1,4 @@
--import SOAP
-+from SOAPpy import SOAPProxy
-
--server = SOAP.SOAPProxy('http://localhost:8082/')
-+server = SOAPProxy('http://localhost:8082/')
- print server.echo("Hello World")
diff --git a/net/py-google/patches/patch-ad b/net/py-google/patches/patch-ad
deleted file mode 100644
index f7028a71a0a..00000000000
--- a/net/py-google/patches/patch-ad
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2003/08/11 22:08:34 recht Exp $
-
---- testserver.py.orig 2002-04-18 10:36:48.000000000 +0200
-+++ testserver.py 2003-05-31 12:20:14.000000000 +0200
-@@ -1,8 +1,8 @@
--import SOAP
-+from SOAPpy import SOAPServer
-
- def echo(s):
- return s + s
-
--server = SOAP.SOAPServer(('localhost', 8082))
-+server = SOAPServer(('localhost', 8082))
- server.registerFunction(echo)
- server.serve_forever()