Fix this for the SOAPpy 0.10.1 update.
Bump PKGREVISION.
This commit is contained in:
parent
ccf462f848
commit
61c9079cd7
6 changed files with 132 additions and 27 deletions
|
@ -1,9 +1,9 @@
|
||||||
# $NetBSD: Makefile,v 1.7 2003/07/21 17:11:11 martti Exp $
|
# $NetBSD: Makefile,v 1.8 2003/08/11 22:08:33 recht Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
DISTNAME= pygoogle-0.5.2
|
DISTNAME= pygoogle-0.5.2
|
||||||
PKGNAME= ${PYPKGPREFIX}-google-0.5.2
|
PKGNAME= ${PYPKGPREFIX}-google-0.5.2
|
||||||
PKGREVISION= 1
|
PKGREVISION= 2
|
||||||
WRKSRC= ${WRKDIR}/pygoogle
|
WRKSRC= ${WRKDIR}/pygoogle
|
||||||
CATEGORIES= net
|
CATEGORIES= net
|
||||||
MASTER_SITES= http://diveintomark.org/projects/pygoogle/
|
MASTER_SITES= http://diveintomark.org/projects/pygoogle/
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
$NetBSD: distinfo,v 1.2 2003/03/19 11:55:11 drochner Exp $
|
$NetBSD: distinfo,v 1.3 2003/08/11 22:08:33 recht Exp $
|
||||||
|
|
||||||
SHA1 (pygoogle-0.5.2.zip) = c152a68759ad97f39e8cab6c71c0e1e2fb9f1103
|
SHA1 (pygoogle-0.5.2.zip) = c152a68759ad97f39e8cab6c71c0e1e2fb9f1103
|
||||||
Size (pygoogle-0.5.2.zip) = 35828 bytes
|
Size (pygoogle-0.5.2.zip) = 35828 bytes
|
||||||
SHA1 (patch-aa) = 4eca6bc0b72c13cbf23ef94c0d4a2370abc200a7
|
SHA1 (patch-aa) = f3f874f4bf8b6f7da16f99bfec6da4575188b72c
|
||||||
SHA1 (patch-ab) = 11cfc3b6c97e52f2be0381a5cb6d12b42a0cd503
|
SHA1 (patch-ab) = 1c9074efff6444cfd05597534fb57308b07e746e
|
||||||
SHA1 (patch-ac) = 92bef26c677fd140626c66ae1c5fc569ffed5d26
|
SHA1 (patch-ac) = 0938d8035a2371870c31e0eff0104ad3d38f4b62
|
||||||
SHA1 (patch-ad) = b063c2229f0e8b288e974ae0f669fe6901351ef3
|
SHA1 (patch-ad) = a95eab548482244e31e5199e8e8991ac828275d9
|
||||||
|
|
|
@ -1,13 +1,65 @@
|
||||||
$NetBSD: patch-aa,v 1.1 2003/03/19 11:55:11 drochner Exp $
|
$NetBSD: patch-aa,v 1.2 2003/08/11 22:08:34 recht Exp $
|
||||||
|
|
||||||
--- google.py.orig 2003-03-19 10:53:37.000000000 +0100
|
--- google.py.orig 2002-04-18 22:11:18.000000000 +0200
|
||||||
+++ google.py 2003-03-19 10:54:00.000000000 +0100
|
+++ google.py 2003-05-31 12:17:35.000000000 +0200
|
||||||
@@ -43,7 +43,7 @@
|
@@ -43,7 +43,8 @@
|
||||||
Erik Max Francis, for the command line interface
|
Erik Max Francis, for the command line interface
|
||||||
Michael Twomey, for HTTP proxy support"""
|
Michael Twomey, for HTTP proxy support"""
|
||||||
|
|
||||||
-import SOAP
|
-import SOAP
|
||||||
+from SOAPpy import SOAP
|
+from SOAPpy import SOAPProxy
|
||||||
|
+from SOAPpy import Types
|
||||||
import os, sys, getopt
|
import os, sys, getopt
|
||||||
|
|
||||||
LICENSE_KEY = None
|
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,10 +202,10 @@
|
||||||
|
class _SearchBase:
|
||||||
|
def __init__(self, params):
|
||||||
|
for k, v in params.items():
|
||||||
|
- if isinstance(v, SOAP.structType):
|
||||||
|
+ if isinstance(v, Types.structType):
|
||||||
|
v = v._asdict
|
||||||
|
try:
|
||||||
|
- if isinstance(v[0], SOAP.structType):
|
||||||
|
+ if isinstance(v[0], Types.structType):
|
||||||
|
v = [node._asdict for node in v]
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
@@ -303,7 +304,7 @@
|
||||||
|
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)
|
||||||
|
@@ -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)
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,61 @@
|
||||||
$NetBSD: patch-ab,v 1.1 2003/03/19 11:55:11 drochner Exp $
|
$NetBSD: patch-ab,v 1.2 2003/08/11 22:08:34 recht Exp $
|
||||||
|
|
||||||
--- googletest.py.orig 2003-03-19 10:52:18.000000000 +0100
|
--- googletest.py.orig 2002-04-18 22:11:18.000000000 +0200
|
||||||
+++ googletest.py 2003-03-19 10:52:53.000000000 +0100
|
+++ googletest.py 2003-05-31 12:23:19.000000000 +0200
|
||||||
@@ -6,7 +6,8 @@
|
@@ -6,7 +6,9 @@
|
||||||
__copyright__ = "Copyright (c) 2002 Mark Pilgrim"
|
__copyright__ = "Copyright (c) 2002 Mark Pilgrim"
|
||||||
__license__ = "Python"
|
__license__ = "Python"
|
||||||
|
|
||||||
-import google, SOAP
|
-import google, SOAP
|
||||||
+import google
|
+import google
|
||||||
+from SOAPpy import SOAP
|
+from SOAPpy import SOAPProxy
|
||||||
|
+from SOAPpy import Types
|
||||||
import unittest
|
import unittest
|
||||||
import sys, os
|
import sys, os
|
||||||
from StringIO import StringIO
|
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()
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
$NetBSD: patch-ac,v 1.1 2003/03/19 11:55:11 drochner Exp $
|
$NetBSD: patch-ac,v 1.2 2003/08/11 22:08:34 recht Exp $
|
||||||
|
|
||||||
--- testclient.py.orig 2003-03-19 12:30:01.000000000 +0100
|
--- testclient.py.orig 2002-04-18 10:36:42.000000000 +0200
|
||||||
+++ testclient.py 2003-03-19 12:30:23.000000000 +0100
|
+++ testclient.py 2003-05-31 12:21:04.000000000 +0200
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-import SOAP
|
-import SOAP
|
||||||
+from SOAPpy import SOAP
|
+from SOAPpy import SOAPProxy
|
||||||
|
|
||||||
server = SOAP.SOAPProxy('http://localhost:8082/')
|
-server = SOAP.SOAPProxy('http://localhost:8082/')
|
||||||
|
+server = SOAPProxy('http://localhost:8082/')
|
||||||
print server.echo("Hello World")
|
print server.echo("Hello World")
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
$NetBSD: patch-ad,v 1.1 2003/03/19 11:55:11 drochner Exp $
|
$NetBSD: patch-ad,v 1.2 2003/08/11 22:08:34 recht Exp $
|
||||||
|
|
||||||
--- testserver.py.orig 2003-03-19 12:30:51.000000000 +0100
|
--- testserver.py.orig 2002-04-18 10:36:48.000000000 +0200
|
||||||
+++ testserver.py 2003-03-19 12:31:16.000000000 +0100
|
+++ testserver.py 2003-05-31 12:20:14.000000000 +0200
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,8 +1,8 @@
|
||||||
-import SOAP
|
-import SOAP
|
||||||
+from SOAPpy import SOAP
|
+from SOAPpy import SOAPServer
|
||||||
|
|
||||||
def echo(s):
|
def echo(s):
|
||||||
return s + s
|
return s + s
|
||||||
|
|
||||||
|
-server = SOAP.SOAPServer(('localhost', 8082))
|
||||||
|
+server = SOAPServer(('localhost', 8082))
|
||||||
|
server.registerFunction(echo)
|
||||||
|
server.serve_forever()
|
||||||
|
|
Loading…
Reference in a new issue