From 8920f60cdd0f6436bd0a87928f284cacf702edaa Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 11 Jun 2012 14:31:58 +0100 Subject: Add way for user to specify additional plugin directories --- morph.1.in | 7 +++++++ morphlib/app.py | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/morph.1.in b/morph.1.in index 6ee9d14e..38bff721 100644 --- a/morph.1.in +++ b/morph.1.in @@ -84,6 +84,13 @@ Otherwise, .B morph sets the environment variable to .BR false . +.TP +.B MORPH_PLUGIN_PATH +.B morph +looks for plugins additionally in the directories given in this variable. +Syntax is same as for +.B PATH +(i.e., colon delimited pathnames). .PP The .BR cliapp (5) diff --git a/morphlib/app.py b/morphlib/app.py index a22a9d51..20934dd7 100755 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -142,6 +142,11 @@ class Morph(cliapp.Application): 'build things in a staging chroot ' '(require real root to use)') + def setup_plugin_manager(self): + cliapp.Application.setup_plugin_manager(self) + s = os.environ.get('MORPH_PLUGIN_PATH', '') + self.pluginmgr.locations += s.split(':') + def _itertriplets(self, args): '''Generate repo, ref, filename triples from args.''' -- cgit v1.2.1