#6235: set MPLCONFIGDIR environment variable when Sage starts up
-----------------------------+----------------------------------------------
Reporter: was | Owner: cwitty
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.6
Component: misc | Keywords:
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Changes (by newvalueoldvalue):
* author: => John Palmieri
Comment:
Replying to [comment:22 jhpalmieri]:
> Here's a patch. The "sed" business could be done more efficiently by
someone who actually knows how to use sed. You can consider this a first
draft if you want, but I'm marking it as ready for review.
{{{
#!sh
...
MPLVER=`sed -n "/^__version__[ ]*=[
]*'[^']*'/s/[^']*'\([^']*\)'.*$/\1/p" "$SAGE_LOCAL"/lib/python/site-
packages/matplotlib/__init__.py`
# Or just (if we check the result):
# MPLVER=`sed -n "/^__version__[ ]*=/s/[^']*'\([^']*\)'.*$/\1/p"
"$SAGE_LOCAL"/lib/python/site-packages/matplotlib/__init__.py`
# Hopefully they never switch to double quotes...
...
$MKDIR -p "$MPLCONFIGDIR" # better quote the dir
}}}
Perhaps also check that {{{"$MPLVER"}}} is non-empty.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6235#comment:24>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.