[svn r37729] Added some code to py.io.FDCapture and py.io.OutErrCapture to allow writing

to the original (patched) file descriptor. Also made that the capturing object
is passed to apigen.py's build() function (from rsession.py), which uses the
new methods to print progress information.

--HG--
branch : trunk
This commit is contained in:
guido
2007-02-01 14:56:31 +01:00
parent 3f31ed5742
commit 9f491f2058
4 changed files with 81 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ def get_documentable_items(pkgdir):
rootmod = __import__(pkgdir.basename)
return 'py', pkg_to_dict(rootmod)
def build(pkgdir, dsa):
def build(pkgdir, dsa, capture):
l = linker.Linker()
proj = project.Project()
@@ -32,16 +32,25 @@ def build(pkgdir, dsa):
apb = htmlgen.ApiPageBuilder(targetdir, l, dsa, pkgdir, namespace_tree)
spb = htmlgen.SourcePageBuilder(targetdir, l, pkgdir)
capture.writeorgerr('preparing namespace pages\n')
ns_data = apb.prepare_namespace_pages()
capture.writeorgerr('preparing class pages\n')
class_names = dsa.get_class_names()
class_data = apb.prepare_class_pages(class_names)
capture.writeorgerr('preparing function pages\n')
function_names = dsa.get_function_names()
func_data = apb.prepare_function_pages(function_names)
capture.writeorgerr('preparing source pages\n')
source_data = spb.prepare_pages(pkgdir)
capture.writeorgerr('building namespace pages\n')
apb.build_namespace_pages(ns_data, proj)
capture.writeorgerr('building class pages\n')
apb.build_class_pages(class_data, proj)
#apb.build_method_pages(method_data, proj)
apb.build_method_pages(method_data, proj)
capture.writeorgerr('building function pages\n')
apb.build_function_pages(func_data, proj)
capture.writeorgerr('building source pages\n')
spb.build_pages(source_data, proj, pkgdir)
capture.writeorgerr('done building documentation\n')