[Python-checkins] r61354 - doctools/trunk/sphinx/builder.py doctools/trunk/sphinx/quickstart.py
georg.brandl
python-checkins at python.org
Wed Mar 12 22:07:53 CET 2008
Author: georg.brandl
Date: Wed Mar 12 22:07:53 2008
New Revision: 61354
Modified:
doctools/trunk/sphinx/builder.py
doctools/trunk/sphinx/quickstart.py
Log:
Template dirs are relative to the root.
Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py (original)
+++ doctools/trunk/sphinx/builder.py Wed Mar 12 22:07:53 2008
@@ -80,7 +80,9 @@
# load templates
self.templates = {}
base_templates_path = path.join(path.dirname(__file__), 'templates')
- loader = SphinxFileSystemLoader(base_templates_path, self.config.templates_path)
+ ext_templates_path = [path.join(self.srcdir, dir)
+ for dir in self.config.templates_path]
+ loader = SphinxFileSystemLoader(base_templates_path, ext_templates_path)
self.jinja_env = Environment(loader=loader,
# disable traceback, more likely that something
# in the application is broken than in the templates
Modified: doctools/trunk/sphinx/quickstart.py
==============================================================================
--- doctools/trunk/sphinx/quickstart.py (original)
+++ doctools/trunk/sphinx/quickstart.py Wed Mar 12 22:07:53 2008
@@ -278,9 +278,10 @@
mkdir_p(srcdir)
if separate:
- mkdir_p(path.join(d['path'], 'build'))
+ builddir = path.join(d['path'], 'build')
else:
- mkdir_p(path.join(srcdir, d['dot'] + 'build'))
+ builddir = path.join(srcdir, d['dot'] + 'build')
+ mkdir_p(builddir)
mkdir_p(path.join(srcdir, d['dot'] + 'templates'))
mkdir_p(path.join(srcdir, d['dot'] + 'static'))
@@ -297,8 +298,10 @@
print bold('Finished: An initial directory structure has been created.')
print '''
You should now populate your master file %s and create other documentation
-source files. Use the sphinx-build.py script to build the docs.
-''' % (masterfile)
+source files. Use the sphinx-build.py script to build the docs, like so:
+
+ sphinx-build.py -b <builder> %s %s
+''' % (masterfile, srcdir, builddir)
def main(argv=sys.argv):
More information about the Python-checkins
mailing list