35 |
else: |
else: |
36 |
return 1 |
return 1 |
37 |
return None |
return None |
|
|
|
|
|
|
|
def build_epydoc(target, source, env): |
|
|
# get where I am currently, just as a reference |
|
|
pwd = os.getcwd() |
|
|
|
|
|
# get the full path of the runepydoc script |
|
|
runepydoc = str(source[0].abspath) |
|
|
|
|
|
# use this path to work out where the doc directory is |
|
|
dirs = runepydoc.split('/') |
|
|
dirs = dirs[:-3] # trim the last two entries: this is now the doc dir path |
|
|
docdir = '/'.join(dirs) # this is the backwards python way to do it |
|
|
# (I'm feeling in a perl mood today...) |
|
|
|
|
|
# change into the relevant dir |
|
|
os.chdir(docdir) |
|
|
|
|
|
# run the epydoc script |
|
|
if not os.system(runepydoc): |
|
|
os.chdir(pwd) |
|
|
open(str(target[0]), 'w').write("Documentation built\n") |
|
|
else: |
|
|
return 1 |
|
|
return None |
|
|
|
|
|
# build doxygen docs |
|
|
def build_doxygen(target, source, env): |
|
|
# get where I am currently, just as a reference |
|
|
pwd = os.getcwd() |
|
|
|
|
|
# get the full path of the rundoxygen script |
|
|
rundoxygen = str(source[0].abspath) |
|
|
|
|
|
# use this path to work out where the doc directory is |
|
|
dirs = rundoxygen.split('/') |
|
|
dirs = dirs[:-2] # trim the last two entries: this is now the doc dir path |
|
|
docdir = '/'.join(dirs) # this is the backwards python way to do it |
|
|
# (I'm feeling in a perl mood today...) |
|
|
|
|
|
# change into the relevant dir |
|
|
os.chdir(docdir) |
|
|
|
|
|
# run the doxygen script |
|
|
if not os.system(rundoxygen): |
|
|
os.chdir(pwd) |
|
|
open(str(target[0]), 'w').write("Documentation built\n") |
|
|
else: |
|
|
return 1 |
|
|
return None |
|