/[escript]/trunk/bin/run-escript
ViewVC logotype

Diff of /trunk/bin/run-escript

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

revision 3792 by caltinay, Wed Feb 1 06:16:25 2012 UTC revision 3975 by caltinay, Thu Sep 20 01:54:06 2012 UTC
# 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      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d"%(sys.version_info[0], sys.version_info[1])'`      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]))'`
376      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
377      then      then
378          echo "Python versions do not match. Escript was compiled for "$compversion"."          echo "Python versions do not match. Escript was compiled for "$compversion"."

Legend:
Removed from v.3792  
changed lines
  Added in v.3975

  ViewVC Help
Powered by ViewVC 1.1.26