From 0f6d83d937e2027654dfd69cb425d0465f3c1664 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2018 15:34:13 +0000 Subject: Add support for 3rd party extensions to runserver.py Signed-off-by: Pierre-Yves Chibon --- diff --git a/runserver.py b/runserver.py index 4080d03..70676bb 100755 --- a/runserver.py +++ b/runserver.py @@ -17,6 +17,9 @@ parser.add_argument( '--config', '-c', dest='config', help='Configuration file to use for pagure.') parser.add_argument( + '--plugins', dest='plugins', + help='Configuration file for pagure plugin.') +parser.add_argument( '--debug', dest='debug', action='store_true', default=False, help='Expand the level of data returned.') @@ -48,6 +51,13 @@ if args.config: config = os.path.join(here, config) os.environ['PAGURE_CONFIG'] = config +if args.plugins: + config = args.plugins + if not config.startswith('/'): + here = os.path.join(os.path.dirname(os.path.abspath(__file__))) + config = os.path.join(here, config) + os.environ['PAGURE_PLUGIN'] = config + if args.perfverbose: os.environ['PAGURE_PERFREPO'] = 'true' os.environ['PAGURE_PERFREPO_VERBOSE'] = 'true'