diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-10-21 03:21:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-10-21 03:21:01 +0400 |
commit | bc55102eac2ac0dfba8f32530ac674213aedc477 (patch) | |
tree | 4ca0181800efddec2c3261c457f39ee61533a92d | |
parent | fd1dcada60d614506641ef266b51f3a811a5c52b (diff) |
renamed WITH_BF_BPYDOC to WITH_BF_DOCS, added SConscript for building BGE docs too.
-rw-r--r-- | SConstruct | 5 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SConscript | 28 | ||||
-rwxr-xr-x | tools/btools.py | 4 |
3 files changed, 33 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index f15aa8bfa22..48115a39b1d 100644 --- a/SConstruct +++ b/SConstruct @@ -577,6 +577,7 @@ if not env['WITHOUT_BF_INSTALL']: # TODO: build stubs and link into blenderplayer #------------ EPYDOC -if env['WITH_BF_BPYDOC']: - SConscript(['source/blender/python/api2_2x/doc/SConscript']) +if env['WITH_BF_DOCS']: + SConscript('source/blender/python/api2_2x/doc/SConscript') + SConscript('source/gameengine/PyDoc/SConscript') diff --git a/source/gameengine/PyDoc/SConscript b/source/gameengine/PyDoc/SConscript new file mode 100644 index 00000000000..3d1aa66bc69 --- /dev/null +++ b/source/gameengine/PyDoc/SConscript @@ -0,0 +1,28 @@ +#!/usr/bin/python +Import ('env') + + +from optparse import OptionParser +try: + import epydoc +except ImportError: + print "No epydoc install detected, Python API Docs will not be generated " +if epydoc: + from epydoc.docbuilder import build_doc_index + from epydoc import cli + names = env.Glob("source/gameengine/PyDoc/*.py") + docindex = build_doc_index(names) + optvalues = cli.OPTION_DEFAULTS + optvalues["verbose"] = 1 + optvalues["target"] = env["BF_DOCDIR"]+"/BGE_API/" + optvalues["url"] = "http://www.blender.org" + optvalues["top"] = "Game Engine API" + optvalues["name"] = "Blender" + optvalues["noprivate"] = 1 + optvalues["noframes"] = 1 + optvalues["names"] = names + optparser = OptionParser() + optparser.set_defaults(**optvalues) + (options, args) = optparser.parse_args() + cli.write_html(docindex, options) + diff --git a/tools/btools.py b/tools/btools.py index 9db7d48cc98..3112e61918a 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -68,7 +68,7 @@ def validate_arguments(args, bc): 'BF_FANCY', 'BF_QUIET', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', - 'WITH_BF_BPYDOC', + 'WITH_BF_DOCS', ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', @@ -353,7 +353,7 @@ def read_opts(cfg, args): ('BF_X264_CONFIG', 'configuration flags for x264', ''), ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''), - (BoolOption('WITH_BF_BPYDOC', 'Generate BPY API documentation', 'false')), + (BoolOption('WITH_BF_DOCS', 'Generate API documentation', 'false')), ('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'), |