Ticket #11914: trac_11914-sage-env-pythonpath.patch

File trac_11914-sage-env-pythonpath.patch, 771 bytes (added by Keshav Kini, 11 years ago)

apply to $SAGE_ROOT/local/bin

  • sage-env

    # HG changeset patch
    # Date 1318398110 -28800
    # User Leif Leonhardy <not.really@online.de>
    # Parent b1cb58dbbe4d72cceec75429cbdee5ab9cd0cd78
    trac #11914: prevent Sage's Python from trying to load the Sage library from ./sage
    
    diff --git a/sage-env b/sage-env
    a b  
    186186fi
    187187
    188188if [ -d "$SAGE_ROOT/local/lib/python" ]; then
    189     PYTHONPATH="$SAGE_PATH:$SAGE_ROOT/local/lib/python"   && export PYTHONPATH
    190     PYTHONHOME="$SAGE_ROOT/local" && export PYTHONHOME
     189    PYTHONPATH="$SAGE_ROOT/local/lib/python"
     190    if [ -n "$SAGE_PATH" ]; then
     191        PYTHONPATH="$SAGE_PATH:$PYTHONPATH"
     192    fi
     193    PYTHONHOME="$SAGE_ROOT/local"
     194    export PYTHONPATH
     195    export PYTHONHOME
    191196fi
    192197
    193198if [ -z "${SAGE_ORIG_LD_LIBRARY_PATH_SET}" ]; then