#16026: Upgrade dot2tex spkg and make it work with most recent matplotlib
-------------------------+-------------------------------------------------
Reporter: | Owner: sage-combinat
tscrim | Status: needs_review
Type: | Milestone: sage-6.2
defect | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | e8abf26678ad91ba5b4da9fb9f26c91e8a16736b
Volker Braun | Stopgaps:
Report Upstream: N/A |
Branch: |
u/vbraun/dot2tex |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by leif):
Sorry, commented on the wrong ticket (#14594,
http://trac.sagemath.org/ticket/14594#comment:62).
Yes, `_noncomma` isn't used by dot2tex, so we can remove it from the
import statement.
But I'd keep the patch trying to use (some version of) `pyparsing` from
matplotlib, just adding yet another import fallback:
{{{
#!diff
--- local/lib/python2.7/site-packages/dot2tex/dotparsing.py 2014-03-29
12:34:13.000000000 -0700
+++ local/lib/python2.7/site-packages/dot2tex/dotparsing.py 2014-03-29
14:35:53.000000000 -0700
@@ -23,8 +23,11 @@
# Newer MPL now ships with pyparsing_py2 and pyparsing_py3:
import matplotlib.pyparsing_py2 as pyparsing
except ImportError:
- import matplotlib.pyparsing as pyparsing
- # just raise if that failed, too
+ try:
+ import matplotlib.pyparsing as pyparsing
+ except ImportError:
+ import pyparsing # shipped separately with newer Sage versions
(>= 6.2.beta5)
+ # just raise if that failed, too
exec(
"""
}}}
`dot2tex` is still an optional spkg, so is likely to get used with older
Sage versions as well (and not just the latest ''development'' version) --
and that should just work.
Another issue is the odd error message currently given, and dot2tex's
`spkg-install` should probably contain some minimal test to avoid such
things in the future.
--
Ticket URL: <http://trac.sagemath.org/ticket/16026#comment:35>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.