mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Added code to generate epydocs as well
This commit is contained in:
parent
7b0e6246a4
commit
1463fae1d9
@ -32,6 +32,7 @@ Options:
|
|||||||
-h print this message
|
-h print this message
|
||||||
-v verbose
|
-v verbose
|
||||||
-d dir directory to write output code
|
-d dir directory to write output code
|
||||||
|
-m dir directory to write HTML manual (optional)
|
||||||
-x dir directory to pull extension code from
|
-x dir directory to pull extension code from
|
||||||
-i lib interrogate library
|
-i lib interrogate library
|
||||||
-e dir directory to search for *.in files (may be repeated)
|
-e dir directory to search for *.in files (may be repeated)
|
||||||
@ -47,6 +48,8 @@ of libraries that are to be instrumented.
|
|||||||
|
|
||||||
# Initialize variables
|
# Initialize variables
|
||||||
outputDir = ''
|
outputDir = ''
|
||||||
|
directDir = ''
|
||||||
|
manualDir = ''
|
||||||
extensionsDir = ''
|
extensionsDir = ''
|
||||||
interrogateLib = ''
|
interrogateLib = ''
|
||||||
codeLibs = []
|
codeLibs = []
|
||||||
@ -96,6 +99,8 @@ def doGetopts():
|
|||||||
FFIConstants.notify.setDebug(1)
|
FFIConstants.notify.setDebug(1)
|
||||||
elif (flag == '-d'):
|
elif (flag == '-d'):
|
||||||
outputDir = value
|
outputDir = value
|
||||||
|
elif (flag == '-m'):
|
||||||
|
manualDir = value
|
||||||
elif (flag == '-x'):
|
elif (flag == '-x'):
|
||||||
extensionsDir = value
|
extensionsDir = value
|
||||||
elif (flag == '-i'):
|
elif (flag == '-i'):
|
||||||
@ -181,6 +186,8 @@ def doErrorCheck():
|
|||||||
|
|
||||||
def run():
|
def run():
|
||||||
global outputDir
|
global outputDir
|
||||||
|
global directDir
|
||||||
|
global manualDir
|
||||||
global extensionsDir
|
global extensionsDir
|
||||||
global interrogateLib
|
global interrogateLib
|
||||||
global codeLibs
|
global codeLibs
|
||||||
@ -195,5 +202,12 @@ def run():
|
|||||||
db = FFIInterrogateDatabase.FFIInterrogateDatabase(etcPath = etcPath)
|
db = FFIInterrogateDatabase.FFIInterrogateDatabase(etcPath = etcPath)
|
||||||
db.generateCode(outputDir, extensionsDir)
|
db.generateCode(outputDir, extensionsDir)
|
||||||
|
|
||||||
|
if manualDir != '' and directDir != '':
|
||||||
|
import epydoc.cli
|
||||||
|
import direct.directbase.DirectStart
|
||||||
|
cmd = ["epydoc","-n","Panda3D","-o",manualDir,"--docformat","panda","--ignore-param-mismatch",outputDir,directDir]
|
||||||
|
sys.argv = cmd
|
||||||
|
epydoc.cli.cli()
|
||||||
|
|
||||||
if doSqueeze:
|
if doSqueeze:
|
||||||
db.squeezeGeneratedCode(outputDir,deleteSourceAfterSqueeze)
|
db.squeezeGeneratedCode(outputDir,deleteSourceAfterSqueeze)
|
||||||
|
@ -73,12 +73,14 @@ if (EXTENSIONS is None):
|
|||||||
from direct.ffi import DoGenPyCode
|
from direct.ffi import DoGenPyCode
|
||||||
from direct.ffi import FFIConstants
|
from direct.ffi import FFIConstants
|
||||||
DoGenPyCode.outputDir = PANDAC
|
DoGenPyCode.outputDir = PANDAC
|
||||||
|
DoGenPyCode.directDir = DIRECT
|
||||||
DoGenPyCode.extensionsDir = EXTENSIONS
|
DoGenPyCode.extensionsDir = EXTENSIONS
|
||||||
DoGenPyCode.interrogateLib = r'libdtoolconfig'
|
DoGenPyCode.interrogateLib = r'libdtoolconfig'
|
||||||
DoGenPyCode.codeLibs = ['libpandaexpress','libpanda','libpandaphysics','libpandafx','libdirect','libpandaegg']
|
DoGenPyCode.codeLibs = ['libpandaexpress','libpanda','libpandaphysics','libpandafx','libdirect','libpandaegg']
|
||||||
DoGenPyCode.etcPath = [os.path.join(PANDAC,"input")]
|
DoGenPyCode.etcPath = [os.path.join(PANDAC,"input")]
|
||||||
|
|
||||||
#print "outputDir = ",DoGenPyCode.outputDir
|
#print "outputDir = ",DoGenPyCode.outputDir
|
||||||
|
#print "directDir = ",DoGenPyCode.directDir
|
||||||
#print "extensionsDir = ",DoGenPyCode.extensionsDir
|
#print "extensionsDir = ",DoGenPyCode.extensionsDir
|
||||||
#print "interrogateLib = ",DoGenPyCode.interrogateLib
|
#print "interrogateLib = ",DoGenPyCode.interrogateLib
|
||||||
#print "codeLibs = ",DoGenPyCode.codeLibs
|
#print "codeLibs = ",DoGenPyCode.codeLibs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user