mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge with 1.0.
This commit is contained in:
@@ -34,6 +34,9 @@ to reStructuredText/Sphinx from other documentation systems.
|
||||
* Marcin Wojdyr has written a script to convert Docbook to reST with Sphinx
|
||||
markup; it is at `Google Code <http://code.google.com/p/db2rst/>`_.
|
||||
|
||||
* To convert different markups, `Pandoc <http://johnmacfarlane.net/pandoc/>`_ is
|
||||
a very helpful tool.
|
||||
|
||||
|
||||
Use with other systems
|
||||
----------------------
|
||||
|
||||
@@ -162,17 +162,19 @@ class StandaloneHTMLBuilder(Builder):
|
||||
old_config_hash = old_tags_hash = ''
|
||||
try:
|
||||
fp = open(path.join(self.outdir, '.buildinfo'))
|
||||
version = fp.readline()
|
||||
if version.rstrip() != '# Sphinx build info version 1':
|
||||
raise ValueError
|
||||
fp.readline() # skip commentary
|
||||
cfg, old_config_hash = fp.readline().strip().split(': ')
|
||||
if cfg != 'config':
|
||||
raise ValueError
|
||||
tag, old_tags_hash = fp.readline().strip().split(': ')
|
||||
if tag != 'tags':
|
||||
raise ValueError
|
||||
fp.close()
|
||||
try:
|
||||
version = fp.readline()
|
||||
if version.rstrip() != '# Sphinx build info version 1':
|
||||
raise ValueError
|
||||
fp.readline() # skip commentary
|
||||
cfg, old_config_hash = fp.readline().strip().split(': ')
|
||||
if cfg != 'config':
|
||||
raise ValueError
|
||||
tag, old_tags_hash = fp.readline().strip().split(': ')
|
||||
if tag != 'tags':
|
||||
raise ValueError
|
||||
finally:
|
||||
fp.close()
|
||||
except ValueError:
|
||||
self.warn('unsupported build info format in %r, building all' %
|
||||
path.join(self.outdir, '.buildinfo'))
|
||||
|
||||
Reference in New Issue
Block a user