aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-prioritized_methods/Makefile25
-rw-r--r--devel/py-prioritized_methods/distinfo3
-rw-r--r--devel/py-prioritized_methods/pkg-descr21
4 files changed, 50 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 9de0e5e61b63..bae593b2572f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2387,6 +2387,7 @@
SUBDIR += py-polib
SUBDIR += py-pp
SUBDIR += py-pqueue
+ SUBDIR += py-prioritized_methods
SUBDIR += py-protobuf
SUBDIR += py-protocols
SUBDIR += py-protocols-devel
diff --git a/devel/py-prioritized_methods/Makefile b/devel/py-prioritized_methods/Makefile
new file mode 100644
index 000000000000..c408b48e134b
--- /dev/null
+++ b/devel/py-prioritized_methods/Makefile
@@ -0,0 +1,25 @@
+# New ports collection makefile for: py-prioritized_methods
+# Date created: 23 June, 2009
+# Whom: Wen Heping <wenheping@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= prioritized_methods
+PORTVERSION= 0.2.1
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= wenheping@gmail.com
+COMMENT= An extension to PEAK-Rules to prioritize methods
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}PEAK-Rules>=0.5:${PORTSDIR}/devel/py-PEAK-Rules
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+PLIST_FILES= %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
+
+USE_PYTHON= yes
+USE_PYDISTUTILS= easy_install
+
+.include <bsd.port.mk>
diff --git a/devel/py-prioritized_methods/distinfo b/devel/py-prioritized_methods/distinfo
new file mode 100644
index 000000000000..86f25e5df6b8
--- /dev/null
+++ b/devel/py-prioritized_methods/distinfo
@@ -0,0 +1,3 @@
+MD5 (prioritized_methods-0.2.1.tar.gz) = 1e9d9de02291b0fc27942b48c170ddc3
+SHA256 (prioritized_methods-0.2.1.tar.gz) = 931da40e1ba53c6d35312371b3c84573f1a5297a0ee6a78584a2337d0180b63c
+SIZE (prioritized_methods-0.2.1.tar.gz) = 4684
diff --git a/devel/py-prioritized_methods/pkg-descr b/devel/py-prioritized_methods/pkg-descr
new file mode 100644
index 000000000000..3f1a665c9984
--- /dev/null
+++ b/devel/py-prioritized_methods/pkg-descr
@@ -0,0 +1,21 @@
+py-rioritized_methods is an extension to PEAK-Rules to prioritize
+methods in order to to avoid AmbiguousMethods situations.This module
+provides four decorators:
+ prioritized_when
+ prioritized_around
+ prioritized_before
+ prioritized_after
+
+These behave like their peak.rules counterparts except that they accept
+an optional prio argument which can be used to provide a comparable
+object (usually an integer) that will be used to disambiguate situations
+in which more than rule applies to the given arguments and no rule is
+more specific than another. That is, situations in which an
+peak.rules.AmbiguousMethods would have been raised.
+
+This is useful for libraries which want to be extensible via generic
+functions but want their users to easily override a method without
+figuring out how to write a more specific rule or when it is not
+feasible.
+
+WWW: http://pypi.python.org/pypi/prioritized_methods/