mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
merge with 0.6
This commit is contained in:
commit
5f710d37bc
3
CHANGES
3
CHANGES
@ -6,6 +6,9 @@ Release 0.7 (in development)
|
||||
Release 0.6.2 (in development)
|
||||
==============================
|
||||
|
||||
* If specific filenames to build are given on the command line,
|
||||
check that they are within the source directory.
|
||||
|
||||
* Fix autodoc crash for objects without a ``__name__``.
|
||||
|
||||
* Fix intersphinx for installations without urllib2.HTTPSHandler.
|
||||
|
@ -234,10 +234,19 @@ class Builder(object):
|
||||
to_write = []
|
||||
suffix = self.config.source_suffix
|
||||
for filename in filenames:
|
||||
filename = path.abspath(filename)[dirlen:]
|
||||
filename = path.normpath(path.abspath(filename))
|
||||
if not filename.startswith(self.srcdir):
|
||||
self.warn('file %r given on command line is not under the '
|
||||
'source directory, ignoring' % filename)
|
||||
continue
|
||||
if not (path.isfile(filename) or path.isfile(filename + suffix)):
|
||||
self.warn('file %r given on command line does not exist, '
|
||||
'ignoring' % filename)
|
||||
continue
|
||||
filename = filename[dirlen:]
|
||||
if filename.endswith(suffix):
|
||||
filename = filename[:-len(suffix)]
|
||||
filename = filename.replace(os.path.sep, SEP)
|
||||
filename = filename.replace(path.sep, SEP)
|
||||
to_write.append(filename)
|
||||
self.build(to_write, method='specific',
|
||||
summary='%d source files given on command '
|
||||
|
Loading…
Reference in New Issue
Block a user