Commits

Erik Hetzner committed 9c51a54

add extra_extensions param to application

  • Participants
  • Parent commits 6e96041

Comments (0)

Files changed (1)

sphinx/application.py

 
     def __init__(self, srcdir, confdir, outdir, doctreedir, buildername,
                  confoverrides=None, status=sys.stdout, warning=sys.stderr,
-                 freshenv=False, warningiserror=False, tags=None):
+                 freshenv=False, warningiserror=False, tags=None, extra_extensions=[]):
         self.next_listener_id = 0
         self._extensions = {}
         self._listeners = {}
         # load all user-given extension modules
         for extension in self.config.extensions:
             self.setup_extension(extension)
+        for extension in extra_extensions:
+            self.setup_extension(extension)
         # the config file itself can be an extension
         if self.config.setup:
             self.config.setup(self)