mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Use the getDocsGenerator factory and allow command line args to determine which docs generator is instantiated.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -347,10 +347,17 @@ def getWrapperGenerator():
|
||||
|
||||
|
||||
def getDocsGenerator():
|
||||
import generators
|
||||
g = generators.StubbedDocsGenerator()
|
||||
return g
|
||||
|
||||
if '--nodocs' in sys.argv:
|
||||
import generators
|
||||
return generators.StubbedDocsGenerator()
|
||||
elif '--sphinx' in sys.argv:
|
||||
import sphinx_generator
|
||||
return sphinx_generator.SphinxGenerator()
|
||||
else:
|
||||
# the current default is sphinx
|
||||
import sphinx_generator
|
||||
return sphinx_generator.SphinxGenerator()
|
||||
|
||||
|
||||
|
||||
def runGenerators(module):
|
||||
@@ -366,10 +373,9 @@ def runGenerators(module):
|
||||
generators.append(pi_generator.PiWrapperGenerator())
|
||||
|
||||
# And finally add the documentation generator
|
||||
import sphinx_generator
|
||||
generators.append(sphinx_generator.SphinxGenerator())
|
||||
generators.append(getDocsGenerator())
|
||||
|
||||
# run them
|
||||
# run the generators
|
||||
for g in generators:
|
||||
g.generate(module)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user