| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | if [scip-shell system . . `[`. -z "$AUTO_DIR" ]; then |
| 3 | bindir=`dirnamescip-shell system . . dirname. "$0"` |
| 4 | AUTO_DIR=`dirnamescip-shell system . . dirname. "$bindir"` |
| 5 | # don't export AUTO_DIR: Python code will use more reliable absolute path |
| 6 | fi |
| 7 | PPATH=$AUTO_DIR/python:$AUTO_DIR/python/auto |
| 8 | if [scip-shell system . . `[`. -z "$PYTHONPATH" ]; then |
| 9 | PYTHONPATH="$PPATH" |
| 10 | else |
| 11 | PYTHONPATH="$PPATH:$PYTHONPATH" |
| 12 | fi |
| 13 | export PYTHONPATH |
| 14 | |
| 15 | if testscip-shell system . . test. "`unamescip-shell system . . uname.`" = "Darwin"; then |
| 16 | if whichscip-shell system . . which. pythonw > /dev/nullscip-shell filesystem . . `/dev/null`.; then |
| 17 | exec pythonw ${1+"$@"}; |
| 18 | fi |
| 19 | fi |
| 20 | |
| 21 | if testscip-shell system . . test. "$OS" = "Windows_NT"; then |
| 22 | PYTHONPATHSEP=`python -c 'import os,sys; sys.stdout.write(os.pathsep)'` |
| 23 | if command -v > /dev/nullscip-shell filesystem . . `/dev/null`. cygpath; then |
| 24 | if testscip-shell system . . test. "$PYTHONPATHSEP" = ";"; then |
| 25 | PYTHONPATH=`cygpath -m -p "$PYTHONPATH"` |
| 26 | export PYTHONPATH |
| 27 | fi |
| 28 | fi |
| 29 | if testscip-shell system . . test. "$MSYSCON" = "mintty.exe"; then |
| 30 | if testscip-shell system . . test. "$PYTHONPATHSEP" = ";" && command -v > /dev/nullscip-shell filesystem . . `/dev/null`. winpty; then |
| 31 | unset AUTO_DIR |
| 32 | command -v > /dev/nullscip-shell filesystem . . `/dev/null`. python && exec winpty python ${1+"$@"}; |
| 33 | exec winpty python3 ${1+"$@"}; |
| 34 | fi |
| 35 | fi |
| 36 | fi |
| 37 | |
| 38 | command -v > /dev/nullscip-shell filesystem . . `/dev/null`. python && exec python ${1+"$@"}; |
| 39 | exec python3 ${1+"$@"}; |