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 martynas@
This commit is contained in:
parent
a550cffedd
commit
c27cab254e
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.6 2008/04/15 11:04:27 eric Exp $
|
||||
# $OpenBSD: Makefile,v 1.7 2008/05/03 12:35:27 eric Exp $
|
||||
|
||||
COMMENT= event-based Python framework (core module)
|
||||
|
||||
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
|
||||
|
||||
@ -19,7 +19,6 @@ post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/doc/py-twisted-core/
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/twisted-regen-dropin.cache ${PREFIX}/sbin/
|
||||
perl -pi -e "s,%%MODPY_BIN%%,${MODPY_BIN},; \
|
||||
s,%%MODPY_SITEPKG%%,${MODPY_SITEPKG}," \
|
||||
${PREFIX}/sbin/twisted-regen-dropin.cache
|
||||
cd ${WRKSRC}/doc && \
|
||||
find . -type d -exec ${INSTALL_DATA_DIR} \
|
||||
|
@ -1,6 +1,12 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: twisted-regen-dropin.cache,v 1.1 2006/07/29 15:12:17 alek Exp $
|
||||
#!%%MODPY_BIN%%
|
||||
# $OpenBSD: twisted-regen-dropin.cache,v 1.2 2008/05/03 12:35:27 eric 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)))
|
||||
|
Loading…
Reference in New Issue
Block a user