#11914: `sage -n` fails when current directory is $SAGE_ROOT/devel/sage
-----------------------+----------------------------------------------------
Reporter: kini | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: scripts | Keywords: startup, crash, sage-env
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
-----------------------+----------------------------------------------------
Comment(by leif):
Pffffffff...
How about this:
{{{
#!diff
diff --git a/sage-env b/sage-env
--- a/sage-env
+++ b/sage-env
@@ -186,7 +186,12 @@
fi
if [ -d "$SAGE_ROOT/local/lib/python" ]; then
- PYTHONPATH="$SAGE_PATH:$SAGE_ROOT/local/lib/python" && export
PYTHONPATH
+ if [ -n "$SAGE_PATH" ]; then
+ PYTHONPATH="$SAGE_PATH:$SAGE_ROOT/local/lib/python"
+ else
+ PYTHONPATH="$SAGE_ROOT/local/lib/python"
+ fi
+ export PYTHONPATH
PYTHONHOME="$SAGE_ROOT/local" && export PYTHONHOME
fi
}}}
We could make it more nice of course.
This disturbed me for a while now...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11914#comment:11>
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.