SCons / epydoc support

* properly detect if epydoc is installed.
  patch by Brandano
This commit is contained in:
Nathan Letwory
2009-04-19 21:26:29 +00:00
parent f5fc4ebdd8
commit fcdbbee208
3 changed files with 43 additions and 46 deletions

View File

@@ -616,6 +616,11 @@ if not env['WITHOUT_BF_INSTALL']:
#------------ EPYDOC #------------ EPYDOC
if env['WITH_BF_DOCS']: if env['WITH_BF_DOCS']:
SConscript('source/blender/python/api2_2x/doc/SConscript') try:
SConscript('source/gameengine/PyDoc/SConscript') import epydoc
SConscript('source/blender/python/api2_2x/doc/SConscript')
SConscript('source/gameengine/PyDoc/SConscript')
except ImportError:
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "

View File

@@ -3,26 +3,22 @@ Import ('env')
from optparse import OptionParser from optparse import OptionParser
try: import epydoc
import epydoc from epydoc.docbuilder import build_doc_index
except ImportError: from epydoc import cli
print "No epydoc install detected, Python API Docs will not be generated " names = env.Glob("source/blender/python/api2_2x/doc/[A-Z]*.py")
if epydoc: docindex = build_doc_index(names)
from epydoc.docbuilder import build_doc_index optvalues = cli.OPTION_DEFAULTS
from epydoc import cli optvalues["verbose"] = 1
names = env.Glob("source/blender/python/api2_2x/doc/[A-Z]*.py") optvalues["target"] = env["BF_DOCDIR"]+"/BPY_API/"
docindex = build_doc_index(names) optvalues["url"] = "http://www.blender.org"
optvalues = cli.OPTION_DEFAULTS optvalues["top"] = "API_intro"
optvalues["verbose"] = 1 optvalues["name"] = "Blender"
optvalues["target"] = env["BF_DOCDIR"]+"/BPY_API/" optvalues["noprivate"] = 1
optvalues["url"] = "http://www.blender.org" optvalues["noframes"] = 1
optvalues["top"] = "API_intro" optvalues["names"] = names
optvalues["name"] = "Blender" optparser = OptionParser()
optvalues["noprivate"] = 1 optparser.set_defaults(**optvalues)
optvalues["noframes"] = 1 (options, args) = optparser.parse_args([])
optvalues["names"] = names cli.write_html(docindex, options)
optparser = OptionParser()
optparser.set_defaults(**optvalues)
(options, args) = optparser.parse_args([])
cli.write_html(docindex, options)

View File

@@ -3,26 +3,22 @@ Import ('env')
from optparse import OptionParser from optparse import OptionParser
try: import epydoc
import epydoc from epydoc.docbuilder import build_doc_index
except ImportError: from epydoc import cli
print "No epydoc install detected, Python API Docs will not be generated " names = env.Glob("source/gameengine/PyDoc/*.py")
if epydoc: docindex = build_doc_index(names)
from epydoc.docbuilder import build_doc_index optvalues = cli.OPTION_DEFAULTS
from epydoc import cli optvalues["verbose"] = 1
names = env.Glob("source/gameengine/PyDoc/*.py") optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/"
docindex = build_doc_index(names) optvalues["url"] = "http://www.blender.org"
optvalues = cli.OPTION_DEFAULTS optvalues["top"] = "Game Engine API"
optvalues["verbose"] = 1 optvalues["name"] = "Blender"
optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/" optvalues["noprivate"] = 1
optvalues["url"] = "http://www.blender.org" optvalues["noframes"] = 1
optvalues["top"] = "Game Engine API" optvalues["names"] = names
optvalues["name"] = "Blender" optparser = OptionParser()
optvalues["noprivate"] = 1 optparser.set_defaults(**optvalues)
optvalues["noframes"] = 1 (options, args) = optparser.parse_args([])
optvalues["names"] = names cli.write_html(docindex, options)
optparser = OptionParser()
optparser.set_defaults(**optvalues)
(options, args) = optparser.parse_args([])
cli.write_html(docindex, options)