Revision: 6951
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6951&view=rev
Author:   mdboom
Date:     2009-03-03 22:08:38 +0000 (Tue, 03 Mar 2009)

Log Message:
-----------
Merged revisions 6950 via svnmerge from 
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint

........
  r6950 | mdboom | 2009-03-03 17:06:53 -0500 (Tue, 03 Mar 2009) | 2 lines
  
  Add workaround for change in handling of absolute paths in image directive in 
recent Sphinx hg versions.
........

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py

Property Changed:
----------------
    trunk/matplotlib/
    trunk/matplotlib/doc/pyplots/README
    trunk/matplotlib/doc/sphinxext/gen_gallery.py
    trunk/matplotlib/doc/sphinxext/gen_rst.py
    trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
    trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
    trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
   - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6948
   + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-6950
Modified: svn:mergeinfo
   - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
   + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950


Property changes on: trunk/matplotlib/doc/pyplots/README
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
   + 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950


Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
   + /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950


Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948
   + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_rst.py:6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950


Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948
   + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950


Property changes on: 
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948
   + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950

Modified: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 
22:06:53 UTC (rev 6950)
+++ trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py 2009-03-03 
22:08:38 UTC (rev 6951)
@@ -30,7 +30,11 @@
     from docutils.parsers.rst.directives.images import Image
     align = Image.align
 from docutils import nodes
+import sphinx
 
+sphinx_version = sphinx.__version__.split(".")
+sphinx_version = tuple([int(x) for x in sphinx_version[:2]])
+
 import matplotlib
 import matplotlib.cbook as cbook
 matplotlib.use('Agg')
@@ -92,11 +96,11 @@
 
    [%(links)s]
 
-   .. image:: %(tmpdir)s/%(outname)s.png
+   .. image:: %(prefix)s%(tmpdir)s/%(outname)s.png
    %(options)s
 
 .. latexonly::
-   .. image:: %(tmpdir)s/%(outname)s.pdf
+   .. image:: %(prefix)s%(tmpdir)s/%(outname)s.pdf
    %(options)s
 """
 
@@ -262,7 +266,17 @@
 
     # tmpdir is where we build all the output files.  This way the
     # plots won't have to be redone when generating latex after html.
-    tmpdir = os.path.abspath(os.path.join('build', outdir))
+
+    # Prior to Sphinx 0.6, absolute image paths were treated as
+    # relative to the root of the filesystem.  0.6 and after, they are
+    # treated as relative to the root of the documentation tree.  We need
+    # to support both methods here.
+    tmpdir = os.path.join('build', outdir)
+    if sphinx_version < (0, 6):
+        tmpdir = os.path.abspath(tmpdir)
+        prefix = ''
+    else:
+        prefix = '/'
     if not os.path.exists(tmpdir):
         cbook.mkdirs(tmpdir)
 


Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948
   + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771
/branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to