The twisted-regen-dropin.cache script (which is now pure python)
interprets its arguments as python module names for which plugin
cache should be updated. This is useful for third-party packages
(such as axiom) which makes use of the twisted plugin
infrastructure. 

ok?

Index: core/Makefile
===================================================================
RCS file: /cvs/ports/devel/py-twisted/core/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- core/Makefile       15 Apr 2008 11:04:27 -0000      1.6
+++ core/Makefile       20 Apr 2008 12:18:14 -0000
@@ -4,7 +4,7 @@
 
 VERSION=       8.0.1
 DISTNAME=      TwistedCore-${VERSION}
-PKGNAME=       py-twisted-core-${VERSION}
+PKGNAME=       py-twisted-core-${VERSION}p0
 
 HOMEPAGE=      http://twistedmatrix.com/trac/wiki/TwistedCore
 
Index: core/files/twisted-regen-dropin.cache
===================================================================
RCS file: /cvs/ports/devel/py-twisted/core/files/twisted-regen-dropin.cache,v
retrieving revision 1.1
diff -u -r1.1 twisted-regen-dropin.cache
--- core/files/twisted-regen-dropin.cache       29 Jul 2006 15:12:17 -0000      
1.1
+++ core/files/twisted-regen-dropin.cache       20 Apr 2008 12:18:14 -0000
@@ -1,6 +1,12 @@
-#!/bin/sh
+#!%%MODPY_BIN%%
 # $OpenBSD: twisted-regen-dropin.cache,v 1.1 2006/07/29 15:12:17 alek Exp $
 
-/bin/rm -f %%MODPY_SITEPKG%%/twisted/plugins/dropin.cache
-%%MODPY_BIN%% -c "from twisted.plugin import IPlugin, getPlugins; \
-                  list(getPlugins(IPlugin))"
+import sys
+
+from twisted.plugin import IPlugin, getPlugins
+from twisted.python.reflect import namedModule
+
+names = sys.argv[1:] or [ 'twisted.plugins' ]
+
+for name in names:
+       list(getPlugins(IPlugin, namedModule(name)))

Reply via email to