[Python-modules-commits] r5292 - in packages/ruledispatch/trunk/debian (3 files)
kov at users.alioth.debian.org
kov at users.alioth.debian.org
Sat May 10 15:52:37 UTC 2008
Date: Saturday, May 10, 2008 @ 15:52:35
Author: kov
Revision: 5292
* debian/patches/01_max_min.diff, debian/README.Debian:
- new patch, embedding the Extremes peak module inside the file that
uses it in ruledispatch
- documented what I did
Added:
packages/ruledispatch/trunk/debian/README.Debian
packages/ruledispatch/trunk/debian/patches/01_max_min.diff
Modified:
packages/ruledispatch/trunk/debian/changelog
Added: packages/ruledispatch/trunk/debian/README.Debian
===================================================================
--- packages/ruledispatch/trunk/debian/README.Debian (rev 0)
+++ packages/ruledispatch/trunk/debian/README.Debian 2008-05-10 15:52:35 UTC (rev 5292)
@@ -0,0 +1,14 @@
+=======================
+RuleDispatch for Debian
+=======================
+
+More recent versions of RuleDispatch use a new PEAK module called
+Extremes, which is comprised of only one very simple class and two
+instances of that class, 'Min' and 'Max'.
+
+I decided to embed that code inside the RuleDispatch package instead
+of packaging the module, because of the overhead. If someone ends up
+packaging that module it may be wise to reevaluate the 01_max_min.diff
+patch.
+
+ -- Gustavo Noronha Silva <kov at debian.org>, Sat, 10 May 2008 12:50:38 -0300
Modified: packages/ruledispatch/trunk/debian/changelog
===================================================================
--- packages/ruledispatch/trunk/debian/changelog 2008-05-10 15:37:02 UTC (rev 5291)
+++ packages/ruledispatch/trunk/debian/changelog 2008-05-10 15:52:35 UTC (rev 5292)
@@ -3,7 +3,11 @@
* Upstream snapshot, svn revision 2538
* debian/patches/00_remove_ezsetup_usage.diff:
- updated to the new version
-
+ * debian/patches/01_max_min.diff, debian/README.Debian:
+ - new patch, embedding the Extremes peak module inside the file that
+ uses it in ruledispatch
+ - documented what I did
+
-- Gustavo Noronha Silva <kov at debian.org> Sat, 10 May 2008 12:00:07 -0300
ruledispatch (0.5a.svn20070626-4) UNRELEASED; urgency=low
Added: packages/ruledispatch/trunk/debian/patches/01_max_min.diff
===================================================================
--- packages/ruledispatch/trunk/debian/patches/01_max_min.diff (rev 0)
+++ packages/ruledispatch/trunk/debian/patches/01_max_min.diff 2008-05-10 15:52:35 UTC (rev 5292)
@@ -0,0 +1,52 @@
+--- src/dispatch/strategy.py~ 2008-05-10 11:50:36.000000000 -0300
++++ src/dispatch/strategy.py 2008-05-10 12:35:15.000000000 -0300
+@@ -50,7 +50,48 @@
+ from dispatch.interfaces import *
+ from new import instancemethod
+ import dispatch
+-from peak.util.extremes import Min, Max
++
++## copied from the Extremes module; info follows:
++# Home-page: http://pypi.python.org/pypi/Extremes
++# Author: Phillip J. Eby
++# Author-email: peak at eby-sarna.com
++# License: PSF or ZPL
++
++class Extreme(object): # Courtesy of PEP 326
++ def __init__(self, cmpr, rep):
++ object.__init__(self)
++ self._cmpr = cmpr
++ self._rep = rep
++
++ def __cmp__(self, other):
++ if isinstance(other, self.__class__):
++ return cmp(self._cmpr, other._cmpr)
++ return self._cmpr
++
++ def __repr__(self):
++ return self._rep
++
++ def __lt__(self,other):
++ return self.__cmp__(other)<0
++
++ def __le__(self,other):
++ return self.__cmp__(other)<=0
++
++ def __gt__(self,other):
++ return self.__cmp__(other)>0
++
++ def __eq__(self,other):
++ return self.__cmp__(other)==0
++
++ def __ge__(self,other):
++ return self.__cmp__(other)>=0
++
++ def __ne__(self,other):
++ return self.__cmp__(other)<>0
++
++Max = Extreme(1, "Max")
++Min = Extreme(-1, "Min")
++# copy ends here
+
+ __all__ = [
+ 'ProtocolCriterion', 'ClassCriterion', 'SubclassCriterion', 'Inequality',
More information about the Python-modules-commits
mailing list