From ef8ae809e648b6869f053f68b5eef61ab8239a12 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Tue, 23 Feb 2010 19:10:43 +0200 Subject: [PATCH 1/5] store actual file modification time instead of now() --- sphinx/environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/environment.py b/sphinx/environment.py index e21364268..d74b323da 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -616,8 +616,8 @@ class BuildEnvironment: self.note_citations_from(docname, doctree) self.build_toc_from(docname, doctree) - # store time of reading, used to find outdated files - self.all_docs[docname] = time.time() + # store file modification time, for outdated files detection + self.all_docs[docname] = path.getmtime(src_path) if app: app.emit('doctree-read', doctree) From b24e6d55e337fc0361dfa3865e95d86b0b7671b7 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 23 Feb 2010 21:35:48 +0100 Subject: [PATCH 2/5] #338: Fix running with ``-C`` under Windows. --- CHANGES | 2 ++ sphinx/application.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 2db62edb4..b47070834 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 0.6.5 (in development) ============================== +* #338: Fix running with ``-C`` under Windows. + * Make the ``start-after`` and ``end-before`` options to the ``literalinclude`` directive work correctly if not used together. diff --git a/sphinx/application.py b/sphinx/application.py index 7d5c54392..3817009f7 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -94,6 +94,11 @@ class Sphinx(object): self.config = Config(confdir, CONFIG_FILENAME, confoverrides, self.tags) self.config.check_unicode(self.warn) + # set confdir to srcdir if -C given (!= no confdir); a few pieces + # of code expect a confdir to be set + if self.confdir is None: + self.confdir = self.srcdir + # load all extension modules for extension in self.config.extensions: self.setup_extension(extension) From 23cec2182335b83905137bfae53f9fc0f6c67d2a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 27 Feb 2010 22:54:31 +0100 Subject: [PATCH 3/5] #341: Always generate UNIX newlines in the quickstart Makefile. --- CHANGES | 2 ++ sphinx/quickstart.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 86e59d31d..7aefbe221 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 0.6.5 (in development) ============================== +* #341: Always generate UNIX newlines in the quickstart Makefile. + * #338: Fix running with ``-C`` under Windows. * In autodoc, allow customizing the signature of an object where diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index ff0d84c85..af1132d56 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -687,7 +687,8 @@ directly.''' if d['makefile']: d['rsrcdir'] = d['sep'] and 'source' or '.' d['rbuilddir'] = d['sep'] and 'build' or d['dot'] + 'build' - f = open(path.join(d['path'], 'Makefile'), 'w') + # use binary mode, to avoid writing \r\n on Windows + f = open(path.join(d['path'], 'Makefile'), 'wb') f.write((MAKEFILE % d).encode('utf-8')) f.close() From fbc2c113ee8cb281d030c486572c5d22ad3b458e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 28 Feb 2010 09:45:28 +0100 Subject: [PATCH 4/5] #345: Fix cropping of sidebar scroll bar with ``stickysidebar`` option of the default theme. --- CHANGES | 3 +++ sphinx/themes/default/static/default.css_t | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 7aefbe221..1a22a4765 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 0.6.5 (in development) ============================== +* #345: Fix cropping of sidebar scroll bar with ``stickysidebar`` + option of the default theme. + * #341: Always generate UNIX newlines in the quickstart Makefile. * #338: Fix running with ``-C`` under Windows. diff --git a/sphinx/themes/default/static/default.css_t b/sphinx/themes/default/static/default.css_t index b465da3fa..5f4a4c6fa 100644 --- a/sphinx/themes/default/static/default.css_t +++ b/sphinx/themes/default/static/default.css_t @@ -67,10 +67,11 @@ div.related a { div.sphinxsidebar { {%- if theme_stickysidebar|tobool %} top: 30px; + bottom: 0; margin: 0; position: fixed; overflow: auto; - height: 100%; + height: auto; {%- endif %} {%- if theme_rightsidebar|tobool %} float: right; From 523b16f005396a3f995a2c4daaae942130eb4461 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 28 Feb 2010 09:49:23 +0100 Subject: [PATCH 5/5] Revert revision 0530a8aaaa9a; it does not work if dependent files are involved. --- sphinx/environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/environment.py b/sphinx/environment.py index d74b323da..88e9f99d7 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -616,8 +616,8 @@ class BuildEnvironment: self.note_citations_from(docname, doctree) self.build_toc_from(docname, doctree) - # store file modification time, for outdated files detection - self.all_docs[docname] = path.getmtime(src_path) + # store time of build, for outdated files detection + self.all_docs[docname] = time.time() if app: app.emit('doctree-read', doctree)