diff options
author | Georg Brandl <georg@python.org> | 2008-05-02 10:32:08 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-02 10:32:08 +0000 |
commit | e2158213e8a3e6db0037aea23f531767a736f1a0 (patch) | |
tree | f089006f833d80233e4aeb0936394a09087bb3b4 /sphinx/builder.py | |
parent | 5a6e3b61d1d451e40d3f3b23029f314e9785b36e (diff) | |
download | sphinx-git-e2158213e8a3e6db0037aea23f531767a736f1a0.tar.gz |
Allow the configuration directory to be set differently from the source directory.
Also don't import docutils on importing sphinx.
Diffstat (limited to 'sphinx/builder.py')
-rw-r--r-- | sphinx/builder.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sphinx/builder.py b/sphinx/builder.py index 2da4503c5..c609dc520 100644 --- a/sphinx/builder.py +++ b/sphinx/builder.py @@ -50,6 +50,7 @@ class Builder(object): def __init__(self, app, env=None, freshenv=False): self.srcdir = app.srcdir + self.confdir = app.confdir self.outdir = app.outdir self.doctreedir = app.doctreedir if not path.isdir(self.doctreedir): @@ -487,19 +488,13 @@ class StandaloneHTMLBuilder(Builder): self.info(' '+src, nonl=1) shutil.copyfile(path.join(self.srcdir, src), path.join(self.outdir, '_images', dest)) - # the logo is handled differently - if self.config.html_logo: - logobase = path.basename(self.config.html_logo) - self.info(' '+logobase, nonl=1) - shutil.copyfile(path.join(self.srcdir, self.config.html_logo), - path.join(self.outdir, '_static', logobase)) self.info() # copy static files self.info(bold('copying static files...')) ensuredir(path.join(self.outdir, '_static')) staticdirnames = [path.join(path.dirname(__file__), 'static')] + \ - [path.join(self.srcdir, spath) + [path.join(self.confdir, spath) for spath in self.config.html_static_path] for staticdirname in staticdirnames: for filename in os.listdir(staticdirname): @@ -819,7 +814,7 @@ class LaTeXBuilder(Builder): if self.config.latex_logo: logobase = path.basename(self.config.latex_logo) self.info(' '+logobase, nonl=1) - shutil.copyfile(path.join(self.srcdir, self.config.latex_logo), + shutil.copyfile(path.join(self.confdir, self.config.latex_logo), path.join(self.outdir, logobase)) self.info(bold('copying TeX support files...')) |