A small patch for sphinxext tools

Hi all,

in various places I've been using the mpl sphinxext tools, so I
figured I'd best send you a few small updates I've made to them before
they bitrot too much. Most of the changes are just cleanup and
documentation, though there is a functional fix in
inheritance_diagram, which was just not working for us in nipy.
There's a comment indicating the change, I hope it makes sense.

I made the patch against svn trunk, though I can't quite test because
I'm getting this:

maqroll[doc]> ./make.py html
Traceback (most recent call last):
  File "./make.py", line 98, in <module>
    func()
  File "./make.py", line 31, in html
    shutil.copy('../lib/matplotlib/mpl-data/matplotlibrc',
'_static/matplotlibrc')
  File "/usr/lib/python2.5/shutil.py", line 85, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.5/shutil.py", line 51, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory:
'../lib/matplotlib/mpl-data/matplotlibrc'

I'm a bit surprised to see this problem, since I imagine you guys
build frequently. But my svn is indeed up to date and that file is
just not there. I'm not sure which way you want the fix to go, so
I'll leave that decision to you guys.

Cheers,

f

mpl-sphinxext.diff (4.65 KB)

I'm a bit surprised to see this problem, since I imagine you guys
build frequently. But my svn is indeed up to date and that file is
just not there. I'm not sure which way you want the fix to go, so
I'll leave that decision to you guys.

I believe mpl-data/matplotlibrc is not version-controled, but created
when you run setup.py.
Maybe you're trying to build the documentation from a new svn checkout
but didn't build the library?

Regards,

-JJ

Aha, that's it, thanks. I'd run svn-clean just before to make sure I
had a clean setup before making the patch, so my build had just been
nuked.

Nothing to worry then, I just did a rebuild and it all seems to work.
So at least the patch doesn't completely crash the doc build :slight_smile:

Cheers,

f

···

On Sun, Feb 1, 2009 at 9:22 PM, Jae-Joon Lee <lee.j.joon@...149...> wrote:

I'm a bit surprised to see this problem, since I imagine you guys
build frequently. But my svn is indeed up to date and that file is
just not there. I'm not sure which way you want the fix to go, so
I'll leave that decision to you guys.

I believe mpl-data/matplotlibrc is not version-controled, but created
when you run setup.py.
Maybe you're trying to build the documentation from a new svn checkout
but didn't build the library?

Thanks Fernando -- applied to svn trunk. I bumped into the svn-clean
no rc file bug just last week, and had to scratch my head for a
second.

JDH

···

On Mon, Feb 2, 2009 at 1:26 AM, Fernando Perez <fperez.net@...149...> wrote:

I believe mpl-data/matplotlibrc is not version-controled, but created
when you run setup.py.
Maybe you're trying to build the documentation from a new svn checkout
but didn't build the library?

Aha, that's it, thanks. I'd run svn-clean just before to make sure I
had a clean setup before making the patch, so my build had just been
nuked.

Nothing to worry then, I just did a rebuild and it all seems to work.
So at least the patch doesn't completely crash the doc build :slight_smile: