diff --git a/CHANGES b/CHANGES index 12a395039..2f4da53a1 100644 --- a/CHANGES +++ b/CHANGES @@ -5,12 +5,9 @@ Incompatible changes -------------------- * Dropped support for Python 2.5 and 3.1. - * Removed the ``sphinx.ext.oldcmarkup`` extension. - * The deprecated config values ``exclude_trees``, ``exclude_dirnames`` and ``unused_docs`` have been removed. - * A new node, ``sphinx.addnodes.literal_strong``, has been added, for text that should appear literally (i.e. no smart quotes) in strong font. Custom writers will have to be adapted to handle this node. @@ -20,23 +17,17 @@ New features * Added ``sphinx.ext.napoleon`` extension for NumPy and Google style docstring support. - * PR#202: Allow "." and "~" prefixed references in ``:param:`` doc fields for Python. - * PR#184: Add :confval:`autodoc_mock_imports`, allowing to mock imports of external modules that need not be present when autodocumenting. - * #925: Allow list-typed config values to be provided on the command line, like ``-D key=val1,val2``. - * #668: Allow line numbering of ``code-block`` and ``literalinclude`` directives to start at an arbitrary line number, with a new ``lineno-start`` option. - * PR#172: The :rst:dir:`code-block` and :rst:dir:`literalinclude` directives now can have a ``filename`` option that shows a filename before the code in the output. - * Prompt for the document language in sphinx-quickstart. Bugs fixed @@ -125,6 +116,8 @@ Bugs fixed the full relative path and not the basename. * #1357: Option names documented by :rst:dir:`option` are now again allowed to not start with a dash or slash, and referencing them will work correctly. +* #1358: Fix handling of image paths outside of the source directory when using + the "wildcard" style reference. Documentation ------------- diff --git a/doc/develop.rst b/doc/develop.rst index faece78d0..41a75dcba 100644 --- a/doc/develop.rst +++ b/doc/develop.rst @@ -25,30 +25,40 @@ releases on PyPI, others you can install from a checkout. This is the current list of contributed extensions in that repository: -- aafig: render embeded ASCII art as nice images using aafigure_. +- aafig: render embedded ASCII art as nice images using aafigure_. - actdiag: embed activity diagrams by using actdiag_ - adadomain: an extension for Ada support (Sphinx 1.0 needed) - ansi: parse ANSI color sequences inside documents -- autorun: Execute code in a runblock directive. +- autorun: Execute code in a ``runblock`` directive. - blockdiag: embed block diagrams by using blockdiag_ - cheeseshop: easily link to PyPI packages - clearquest: create tables from ClearQuest_ queries. +- cmakedomain_: a domain for CMake_ - coffeedomain: a domain for (auto)documenting CoffeeScript source code. - context: a builder for ConTeXt. - doxylink: Link to external Doxygen-generated HTML documentation +- domaintools_: A tool for easy domain creation. - email: obfuscate email addresses - erlangdomain: an extension for Erlang support (Sphinx 1.0 needed) - exceltable: embed Excel spreadsheets into documents using exceltable_ - feed: an extension for creating syndication feeds and time-based overviews from your site content +- findanything_: an extension to add Sublime Text 2-like findanything panels + to your documentation to find pages, sections and index entries while typing - gnuplot: produces images using gnuplot_ language. -- googleanalytics: track html visitors statistics +- googleanalytics: track web visitor statistics by using `Google Analytics`_ - googlechart: embed charts by using `Google Chart`_ - googlemaps: embed maps by using `Google Maps`_ - httpdomain: a domain for documenting RESTful HTTP APIs. - hyphenator: client-side hyphenation of HTML using hyphenator_ +- inlinesyntaxhighlight_: inline syntax highlighting +- lassodomain: a domain for documenting Lasso_ source code - lilypond: an extension inserting music scripts from Lilypond_ in PNG format. +- makedomain_: a domain for `GNU Make`_ +- matlabdomain: document MATLAB_ code. +- mockautodoc: mock imports. - mscgen: embed mscgen-formatted MSC (Message Sequence Chart)s. +- napoleon: supports `Google style`_ and `NumPy style`_ docstrings. - nicoviceo: embed videos from nicovideo - nwdiag: embed network diagrams by using nwdiag_ - omegat: support tools to collaborate with OmegaT_ (Sphinx 1.1 needed) @@ -56,16 +66,18 @@ This is the current list of contributed extensions in that repository: - paverutils: an alternate integration of Sphinx with Paver_. - phpdomain: an extension for PHP support - plantuml: embed UML diagram by using PlantUML_ +- py_directive: Execute python code in a ``py`` directive and return a math node. - rawfiles: copy raw files, like a CNAME. - requirements: declare requirements wherever you need (e.g. in test docstrings), mark statuses and collect them in a single list +- restbuilder: a builder for reST (reStructuredText) files. - rubydomain: an extension for Ruby support (Sphinx 1.0 needed) - sadisplay: display SqlAlchemy model sadisplay_ -- sdedit: an extension inserting sequence diagram by using Quick Sequence. +- sdedit: an extension inserting sequence diagram by using Quick Sequence Diagram Editor (sdedit_) - seqdiag: embed sequence diagrams by using seqdiag_ - slide: embed presentation slides on slideshare_ and other sites. -- swf: embed flash files +- swf_: embed flash files - sword: an extension inserting Bible verses from Sword_. - tikz: draw pictures with the `TikZ/PGF LaTeX package`_. - traclinks: create TracLinks_ to a Trac_ instance from within Sphinx @@ -94,8 +106,11 @@ own extensions. .. _seqdiag: http://blockdiag.com/en/ .. _actdiag: http://blockdiag.com/en/ .. _nwdiag: http://blockdiag.com/en/ +.. _Google Analytics: http://www.google.com/analytics/ .. _Google Chart: https://developers.google.com/chart/ .. _Google Maps: https://maps.google.com/ +.. _Google style: http://google-styleguide.googlecode.com/svn/trunk/pyguide.html +.. _NumPy style: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt .. _hyphenator: http://code.google.com/p/hyphenator/ .. _exceltable: http://pythonhosted.org/sphinxcontrib-exceltable/ .. _YouTube: http://www.youtube.com/ @@ -103,3 +118,14 @@ own extensions. .. _Zope interfaces: http://docs.zope.org/zope.interface/README.html .. _slideshare: http://www.slideshare.net/ .. _TikZ/PGF LaTeX package: http://sourceforge.net/projects/pgf/ +.. _MATLAB: http://www.mathworks.com/products/matlab/ +.. _swf: http://bitbucket.org/klorenz/sphinxcontrib-swf +.. _findanything: http://bitbucket.org/klorenz/sphinxcontrib-findanything +.. _cmakedomain: http://bitbucket.org/klorenz/sphinxcontrib-cmakedomain +.. _GNU Make: http://www.gnu.org/software/make/ +.. _makedomain: http://bitbucket.org/klorenz/sphinxcontrib-makedomain +.. _inlinesyntaxhighlight: http://sphinxcontrib-inlinesyntaxhighlight.readthedocs.org +.. _CMake: http://cmake.org +.. _domaintools: http://bitbucket.org/klorenz/sphinxcontrib-domaintools +.. _restbuilder: https://pypi.python.org/pypi/sphinxcontrib-restbuilder +.. _Lasso: http://www.lassosoft.com/ diff --git a/doc/extdev/envapi.rst b/doc/extdev/envapi.rst index 56771f733..84ad3e0d9 100644 --- a/doc/extdev/envapi.rst +++ b/doc/extdev/envapi.rst @@ -9,7 +9,7 @@ Build environment API .. attribute:: app - Reference to the application object. + Reference to the :class:`.Sphinx` (application) object. .. attribute:: config diff --git a/sphinx/environment.py b/sphinx/environment.py index 784f4f8b5..c13a4af9a 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -796,7 +796,8 @@ class BuildEnvironment: node['uri'] = rel_imgpath if rel_imgpath.endswith(os.extsep + '*'): for filename in glob(full_imgpath): - new_imgpath = relative_path(self.srcdir, filename) + new_imgpath = relative_path(path.join(self.srcdir, 'dummy'), + filename) if filename.lower().endswith('.pdf'): candidates['application/pdf'] = new_imgpath elif filename.lower().endswith('.svg'): diff --git a/sphinx/transforms.py b/sphinx/transforms.py index c991f7f73..9b920eb9d 100644 --- a/sphinx/transforms.py +++ b/sphinx/transforms.py @@ -162,7 +162,8 @@ class Locale(Transform): settings, source = self.document.settings, self.document['source'] # XXX check if this is reliable assert source.startswith(env.srcdir) - docname = path.splitext(relative_path(env.srcdir, source))[0] + docname = path.splitext(relative_path(path.join(env.srcdir, 'dummy'), + source))[0] textdomain = find_catalog(docname, self.document.settings.gettext_compact) diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 64fbae79e..d0104f5d6 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -142,7 +142,7 @@ def copy_static_entry(source, targetdir, builder, context={}, Handles all possible cases of files, directories and subdirectories. """ if exclude_matchers: - relpath = relative_path(builder.srcdir, source) + relpath = relative_path(path.join(builder.srcdir, 'dummy'), source) for matcher in exclude_matchers: if matcher(relpath): return