summaryrefslogtreecommitdiff
path: root/time/py-mxDateTime
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-07-06 21:42:38 +0000
committerjoerg <joerg@pkgsrc.org>2009-07-06 21:42:38 +0000
commit1da2393dc7dc140f9fb601e9900386e572f91c6c (patch)
treef781b5d78fec01f3e746912f0e3b58b96946a94e /time/py-mxDateTime
parent8ba9594cc09cc51b5103a9c270420ec0290dd7a7 (diff)
downloadpkgsrc-1da2393dc7dc140f9fb601e9900386e572f91c6c.tar.gz
with is a reserved word for Python 2.6, so avoid it.
Diffstat (limited to 'time/py-mxDateTime')
-rw-r--r--time/py-mxDateTime/distinfo3
-rw-r--r--time/py-mxDateTime/patches/patch-aa124
2 files changed, 126 insertions, 1 deletions
diff --git a/time/py-mxDateTime/distinfo b/time/py-mxDateTime/distinfo
index 55fe4f253ba..1de75eaaf8a 100644
--- a/time/py-mxDateTime/distinfo
+++ b/time/py-mxDateTime/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.7 2005/02/23 19:14:55 wiz Exp $
+$NetBSD: distinfo,v 1.8 2009/07/06 21:42:38 joerg Exp $
SHA1 (egenix-mx-base-2.0.6.tar.gz) = 7f964408e3bd907c1a39b0f8d8d00d2367d97841
RMD160 (egenix-mx-base-2.0.6.tar.gz) = dc25b5941cb790d1aa424a7eb1849ddf7231fa0e
Size (egenix-mx-base-2.0.6.tar.gz) = 586854 bytes
+SHA1 (patch-aa) = 4d35beff0cef676a2c5bb28d379d36e29a94aaec
diff --git a/time/py-mxDateTime/patches/patch-aa b/time/py-mxDateTime/patches/patch-aa
new file mode 100644
index 00000000000..f5ad53278c3
--- /dev/null
+++ b/time/py-mxDateTime/patches/patch-aa
@@ -0,0 +1,124 @@
+$NetBSD: patch-aa,v 1.3 2009/07/06 21:42:38 joerg Exp $
+
+--- mx/TextTools/TextTools.py.orig 2009-07-06 21:37:44.000000000 +0000
++++ mx/TextTools/TextTools.py
+@@ -167,7 +167,7 @@ def word_in_list(l):
+ # Extra stuff useful in combination with the C functions
+ #
+
+-def replace(text,what,with,start=0,stop=None,
++def replace(text,what,with_,start=0,stop=None,
+
+ SearchObject=BMS,join=join,joinlist=joinlist,tag=tag,
+ string_replace=string.replace,type=type,
+@@ -188,11 +188,11 @@ def replace(text,what,with,start=0,stop=
+ what = so.match
+ if stop is None:
+ if start == 0 and len(what) < 2:
+- return string_replace(text,what,with)
++ return string_replace(text,what,with_)
+ stop = len(text)
+ t = ((text,sWordStart,so,+2),
+ # Found something, replace and continue searching
+- (with,Skip+AppendTagobj,len(what),-1,-1),
++ (with_,Skip+AppendTagobj,len(what),-1,-1),
+ # Rest of text
+ (text,Move,ToEOF)
+ )
+@@ -203,7 +203,7 @@ def replace(text,what,with,start=0,stop=
+
+ # Alternative (usually slower) versions using different techniques:
+
+-def _replace2(text,what,with,start=0,stop=None,
++def _replace2(text,what,with_,start=0,stop=None,
+
+ join=join,joinlist=joinlist,tag=tag,
+ StringType=types.StringType,BMS=BMS):
+@@ -222,13 +222,13 @@ def _replace2(text,what,with,start=0,sto
+ stop = len(text)
+ if type(what) == StringType:
+ what=BMS(what)
+- t = ((with,sFindWord,what,+1,+0),)
++ t = ((with_,sFindWord,what,+1,+0),)
+ found,taglist,last = tag(text,t,start,stop)
+ if not found:
+ return text
+ return join(joinlist(text,taglist))
+
+-def _replace3(text,what,with,
++def _replace3(text,what,with_,
+
+ join=string.join,FS=FS,
+ StringType=types.StringType):
+@@ -241,12 +241,12 @@ def _replace3(text,what,with,
+ l = []
+ x = 0
+ for left,right in slices:
+- l.append(text[x:left] + with)
++ l.append(text[x:left] + with_)
+ x = right
+ l.append(text[x:])
+ return join(l,'')
+
+-def _replace4(text,what,with,
++def _replace4(text,what,with_,
+
+ join=join,joinlist=joinlist,tag=tag,FS=FS,
+ StringType=types.StringType):
+@@ -258,7 +258,7 @@ def _replace4(text,what,with,
+ return text
+ repl = [None]*len(slices)
+ for i in range(len(slices)):
+- repl[i] = (with,)+slices[i]
++ repl[i] = (with_,)+slices[i]
+ return join(joinlist(text,repl))
+
+ def multireplace(text,replacements,start=0,stop=None,
+@@ -554,16 +554,16 @@ def _bench(file='mxTextTools/mxTextTools
+ print 'Replacing strings'
+ print '-'*72
+ print
+- for what,with in (('m','M'),('mx','MX'),('mxText','MXTEXT'),
++ for what,with_ in (('m','M'),('mx','MX'),('mxText','MXTEXT'),
+ ('hmm','HMM'),('hmmm','HMM'),('hmhmm','HMM')):
+- print 'Replace "%s" with "%s"' % (what,with)
++ print 'Replace "%s" with "%s"' % (what,with_)
+ t.start()
+ for i in range(100):
+- rtext = string.replace(text,what,with)
++ rtext = string.replace(text,what,with_)
+ print 'with string.replace:',t.stop(),'sec.'
+ t.start()
+ for i in range(100):
+- ttext = replace(text,what,with)
++ ttext = replace(text,what,with_)
+ print 'with tag.replace:',t.stop(),'sec.'
+ if ttext != rtext:
+ print 'results are NOT ok !'
+@@ -571,7 +571,7 @@ def _bench(file='mxTextTools/mxTextTools
+ mismatch(rtext,ttext)
+ t.start()
+ for i in range(100):
+- ttext = _replace2(text,what,with)
++ ttext = _replace2(text,what,with_)
+ print 'with tag._replace2:',t.stop(),'sec.'
+ if ttext != rtext:
+ print 'results are NOT ok !'
+@@ -579,7 +579,7 @@ def _bench(file='mxTextTools/mxTextTools
+ print rtext
+ t.start()
+ for i in range(100):
+- ttext = _replace3(text,what,with)
++ ttext = _replace3(text,what,with_)
+ print 'with tag._replace3:',t.stop(),'sec.'
+ if ttext != rtext:
+ print 'results are NOT ok !'
+@@ -587,7 +587,7 @@ def _bench(file='mxTextTools/mxTextTools
+ print rtext
+ t.start()
+ for i in range(100):
+- ttext = _replace4(text,what,with)
++ ttext = _replace4(text,what,with_)
+ print 'with tag._replace4:',t.stop(),'sec.'
+ if ttext != rtext:
+ print 'results are NOT ok !'