Revision: 7880
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7880&view=rev
Author: leejjoon
Date: 2009-10-12 23:02:27 +0000 (Mon, 12 Oct 2009)
Log Message:
-----------
fix plot_directive.py that generated incorrect links for some cases
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
Modified: branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
2009-10-12 16:30:14 UTC (rev 7879)
+++ branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
2009-10-12 23:02:27 UTC (rev 7880)
@@ -260,12 +260,10 @@
# the temporary directory, and then sphinx moves the file to
# build/html/_images for us later.
rstdir, rstfile =
os.path.split(state_machine.document.attributes['source'])
- reldir = rstdir[len(setup.confdir)+1:]
- relparts = [p for p in os.path.split(reldir) if p.strip()]
- nparts = len(relparts)
outdir = os.path.join('plot_directive', basedir)
- linkdir = ('../' * nparts) + outdir
-
+ reldir = relpath(setup.confdir, rstdir)
+ linkdir = os.path.join(reldir, outdir)
+
# tmpdir is where we build all the output files. This way the
# plots won't have to be redone when generating latex after html.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins