/[escript]/branches/py3_attempt2/bin/run-escript
ViewVC logotype

Diff of /branches/py3_attempt2/bin/run-escript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3871 by jfenwick, Thu Mar 15 07:06:51 2012 UTC revision 3888 by jfenwick, Tue Apr 10 02:13:06 2012 UTC
# Line 62  fi Line 62  fi
62    
63  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"  PYTHON_MPI_NULL="$ESCRIPT_ROOT/lib/pythonMPI"
64  PYTHON_MPI_REDIRECT="$ESCRIPT_ROOT/lib/pythonMPIredirect"  PYTHON_MPI_REDIRECT="$ESCRIPT_ROOT/lib/pythonMPIredirect"
65  PYTHON_CMD=python3  PYTHON_CMD=python
66    
67  # if possible please express paths relative to $ESCRIPT_ROOT unless  # if possible please express paths relative to $ESCRIPT_ROOT unless
68  # they are in an unrelated location  # they are in an unrelated location
# Line 362  then Line 362  then
362  else  else
363      # Check to see if the python version we were compiled with matches the      # Check to see if the python version we were compiled with matches the
364      # one of PYTHON_CMD.      # one of PYTHON_CMD.
365      compversion=`get_buildvar python_version | cut -d. -f1,2`      compfull=`get_buildvar python_version`
366        compversion=`echo $compfull | cut -d. -f1,2`
367        compmajor=`echo $compfull | cut -d. -f1`
368        if [ "$PYTHON_CMD" = "python" ] # if people have customised the command they
369        then                                # might not want us changing it
370            if [ "$compmajor" = "3" ]
371            then
372                PYTHON_CMD=python3
373            fi
374        fi
375      intversion=`$PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))'`      intversion=`$PYTHON_CMD -c 'from __future__ import print_function;import sys;print("%d.%d"%(sys.version_info[0], sys.version_info[1]))'`
376      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
377      then      then

Legend:
Removed from v.3871  
changed lines
  Added in v.3888

  ViewVC Help
Powered by ViewVC 1.1.26