From f1f27c0350bbff1aa7f444f75eab294dd6b78e16 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Sun, 19 Oct 2008 22:01:46 +0000 Subject: === SCons === [#17867] Adds option to SCONS to generate Python API documentation Added patch from Brandano with some small improvements (BF_DOCDIR, clean) by yours truly. To use make sure you have epydoc installed. Enable with WITH_BF_BPYDOC=1. --- tools/Blender.py | 1 + tools/btools.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/Blender.py b/tools/Blender.py index 330a3713817..9baeb374af8 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -35,6 +35,7 @@ GetBuildPath = SConsEnvironment.GetBuildPath # a few globals root_build_dir = '' +doc_build_dir = '' quickie = None # Anything else than None if BF_QUICK has been passed quicklist = [] # The list of libraries/programs to compile during a quickie program_list = [] # A list holding Nodes to final binaries, used to create installs diff --git a/tools/btools.py b/tools/btools.py index 04ff9bcd914..9db7d48cc98 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -68,6 +68,7 @@ def validate_arguments(args, bc): 'BF_FANCY', 'BF_QUIET', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', + 'WITH_BF_BPYDOC', ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', @@ -75,7 +76,8 @@ def validate_arguments(args, bc): 'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_DEBUG_FLAGS', 'BF_BSC', 'BF_CONFIG', 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG', - 'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG'] + 'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG', + 'BF_DOCDIR'] all_list = opts_list + arg_list okdict = {} @@ -335,6 +337,7 @@ def read_opts(cfg, args): ('BF_BUILDDIR', 'Build dir', ''), ('BF_INSTALLDIR', 'Installation dir', ''), + ('BF_DOCDIR', 'Dir where BPy documentation will be created', ''), ('CC', 'C compiler to use', ''), ('CXX', 'C++ compiler to use', ''), @@ -350,6 +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')), ('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'), -- cgit v1.2.3