Jason Grout wrote: > Carl Witty wrote: >> On Tue, Feb 24, 2009 at 10:42 PM, John H Palmieri >> <jhpalmier...@gmail.com> wrote: >>> One question: how do I build the documentation? >> With "sage -docbuild". Type just "sage -docbuild" to list all the >> possibilities; the simplest is just "sage -docbuild reference html", >> which will grind away for a while (about 10 minutes on my computer) >> and put the results in devel/sage/doc/output/html/en/reference. >> >> (It's much, much faster on subsequent runs; it's smart enough to only >> rebuild the parts of the documentation corresponding to modules that >> have changed.) >> >> Note that just editing a source file, then running "sage -docbuild" >> isn't enough to see the changed documentation; the documentation >> builder uses Python introspection, so you have to use "sage -b" to >> recompile before running docbuild. >> > > > Very nice! > sage -docbuild website html > > and > > sage -docbuild developer html > > build the "fast static docs" very quickly. When I tried to build all of > the html documentation, though, I got the following: > > > $ sage -docbuild all html > sphinx-build -b html -d > /home/jason/sage/devel/sage/doc/output/doctrees/en/website . > /home/jason/sage/devel/sage/doc/output/html/en/website > Sphinx v0.5.1, building html > loading pickled environment... done > building [html]: targets for 0 source files that are out of date > updating environment: 0 added, 0 changed, 0 removed > no targets are out of date. > Build finished. The built documents can be found in > /home/jason/sage/devel/sage/doc/output/html/en/website > Traceback (most recent call last): > File "/home/jason/sage/devel/sage/doc/common/builder.py", line 674, > in <module> > getattr(get_builder(name), type)(*args) > File "/home/jason/sage/devel/sage/doc/common/builder.py", line 261, > in _wrapper > getattr(get_builder(document), name)(*args, **kwds) > File "/home/jason/sage/devel/sage/doc/common/builder.py", line 291, > in html > os.path.realpath(os.path.join(html_output_dir, '..'))) > File "/home/jason/sage/devel/sage/doc/common/builder.py", line 101, > in copytree > raise Error, errors > NameError: global name 'Error' is not defined > > It looks like a "StandardError" or "RuntimeError" should be thrown and > caught, rather than "Error", on lines 92 and 101 of builder.py
After making the above change, I notice that when generating the website twice, there is a problem. First, I moved the old built docs out of the way. $ mv ~/sage/devel/sage/doc/output/html ~/sage/devel/sage/doc/output/jason $ sage -docbuild website html sphinx-build -b html -d /home/jason/sage/devel/sage/doc/output/doctrees/en/website . /home/jason/sage/devel/sage/doc/output/html/en/website Sphinx v0.5.1, building html loading pickled environment... done building [html]: targets for 1 source files that are out of date updating environment: 0 added, 0 changed, 0 removed preparing documents... WARNING: html_favicon is not an .ico file done writing output... index writing additional files... genindex search index copying static files... done dumping search index... done dumping object inventory... done build succeeded, 1 warning. Build finished. The built documents can be found in /home/jason/sage/devel/sage/doc/output/html/en/website Then I try to build it again: $ sage -docbuild website html sphinx-build -b html -d /home/jason/sage/devel/sage/doc/output/doctrees/en/website . /home/jason/sage/devel/sage/doc/output/html/en/website Sphinx v0.5.1, building html loading pickled environment... done building [html]: targets for 0 source files that are out of date updating environment: 0 added, 0 changed, 0 removed no targets are out of date. Build finished. The built documents can be found in /home/jason/sage/devel/sage/doc/output/html/en/website Traceback (most recent call last): File "/home/jason/sage/devel/sage/doc/common/builder.py", line 674, in <module> getattr(get_builder(name), type)(*args) File "/home/jason/sage/devel/sage/doc/common/builder.py", line 291, in html os.path.realpath(os.path.join(html_output_dir, '..'))) File "/home/jason/sage/devel/sage/doc/common/builder.py", line 101, in copytree raise StandardError, errors StandardError: [('/home/jason/sage/devel/sage/doc/output/html/en/website/_static', '/home/jason/sage/devel/sage-main/doc/output/html/en/_static', "[Errno 17] File exists: '/home/jason/sage/devel/sage-main/doc/output/html/en/_static'"), ('/home/jason/sage/devel/sage/doc/output/html/en/website/_sources', '/home/jason/sage/devel/sage-main/doc/output/html/en/_sources', "[Errno 17] File exists: '/home/jason/sage/devel/sage-main/doc/output/html/en/_sources'")] I assume the fix is easy? I'm not familiar with the code, which is why I'm posting it here before making a trac ticket. Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---