1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Description: fix invalid version number ValueError
the 'anarchic' version numbering of Pygments (currently in Sid: '2.0rc1') doesn't
fit into the needs for distutils.version.StrictVersion. LooseVersion isn't perfect,
but fulfills what's needed here
Author: Daniel Stender <debian@danielstender.com>
Bug: http://bugs.debian.org/767158
Forwarded: http://sourceforge.net/p/gamera/code/1424/tree//trunk/gamera/gamera/gendoc.py?diff=50c1e1f034309d0a1716b4b0:1423
Last-Update: 2014-10-29
--- a/gamera/gendoc.py
+++ b/gamera/gendoc.py
@@ -29,7 +29,7 @@
import locale
import traceback
import warnings
-from distutils.version import StrictVersion
+from distutils.version import StrictVersion, LooseVersion
from gamera.util import dedent
try:
locale.setlocale(locale.LC_ALL, '')
@@ -57,7 +57,7 @@
import pygments.lexers
import pygments.formatters
source_highlighter = 'pygments'
- if StrictVersion(pygments.__version__) < StrictVersion('0.6'):
+ if LooseVersion(pygments.__version__) < LooseVersion('0.6'):
print "pygments version (" + pygments.__version__ + ") too old"
raise ImportError()
except ImportError, e:
|