Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f5d462

Browse files
committed
applied Gael's sphinx patch
svn path=/trunk/matplotlib/; revision=7006
1 parent e6ee8fb commit 6f5d462

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"""
1818

1919
import sys, os, glob, shutil, hashlib, imp, warnings, cStringIO
20+
import re
2021
try:
2122
from hashlib import md5
2223
except ImportError:
@@ -33,7 +34,10 @@
3334
import sphinx
3435

3536
sphinx_version = sphinx.__version__.split(".")
36-
sphinx_version = tuple([int(x) for x in sphinx_version[:2]])
37+
# The split is necessary for sphinx beta versions where the string is
38+
# '6b1'
39+
sphinx_version = tuple([int(re.split('[a-z]', x)[0])
40+
for x in sphinx_version[:2]])
3741

3842
import matplotlib
3943
import matplotlib.cbook as cbook

0 commit comments

Comments
 (0)