Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2008-10-20 02:01:46 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2008-10-20 02:01:46 +0400
commitf1f27c0350bbff1aa7f444f75eab294dd6b78e16 (patch)
tree2abbd1bab0ed7b39be2fd458ac807cce3f570223 /SConstruct
parent3544a4bd366c98bd5e514c7637ce0b1a369b6282 (diff)
=== 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.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct23
1 files changed, 18 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct
index e7d4a4e77bd..f15aa8bfa22 100644
--- a/SConstruct
+++ b/SConstruct
@@ -277,15 +277,15 @@ if 'blenderlite' in B.targets:
env['WITH_BF_BINRELOC'] = False
env['BF_BUILDINFO'] = False
env['BF_NO_ELBEEM'] = True
-
-
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
B.root_build_dir = env['BF_BUILDDIR']
-env['BUILDDIR'] = B.root_build_dir
+B.doc_build_dir = env['BF_DOCDIR']
if not B.root_build_dir[-1]==os.sep:
B.root_build_dir += os.sep
+if not B.doc_build_dir[-1]==os.sep:
+ B.doc_build_dir += os.sep
# We do a shortcut for clean when no quicklist is given: just delete
# builddir without reading in SConscripts
@@ -294,8 +294,18 @@ if 'clean' in B.targets:
do_clean = True
if not quickie and do_clean:
+ if os.path.exists(B.doc_build_dir):
+ print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
+ dirs = os.listdir(B.doc_build_dir)
+ for entry in dirs:
+ if os.path.isdir(B.doc_build_dir + entry) == 1:
+ print "clean dir %s"%(B.doc_build_dir+entry)
+ shutil.rmtree(B.doc_build_dir+entry)
+ else: # remove file
+ print "remove file %s"%(B.doc_build_dir+entry)
+ os.remove(B.root_build_dir+entry)
if os.path.exists(B.root_build_dir):
- print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
+ print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
dirs = os.listdir(B.root_build_dir)
for entry in dirs:
if os.path.isdir(B.root_build_dir + entry) == 1:
@@ -321,6 +331,8 @@ if not os.path.isdir ( B.root_build_dir):
os.makedirs ( B.root_build_dir + 'extern' )
os.makedirs ( B.root_build_dir + 'lib' )
os.makedirs ( B.root_build_dir + 'bin' )
+if not os.path.isdir(B.doc_build_dir):
+ os.makedirs ( B.doc_build_dir )
Help(opts.GenerateHelpText(env))
@@ -565,5 +577,6 @@ if not env['WITHOUT_BF_INSTALL']:
# TODO: build stubs and link into blenderplayer
#------------ EPYDOC
-# TODO: run epydoc
+if env['WITH_BF_BPYDOC']:
+ SConscript(['source/blender/python/api2_2x/doc/SConscript'])