/[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 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3340 by jfenwick, Mon Nov 8 01:25:58 2010 UTC
# Line 58  else Line 58  else
58  fi  fi
59  ##### End finding ESCRIPT_ROOT  ########  ##### End finding ESCRIPT_ROOT  ########
60    
 BUILDINFO_FILE=$ESCRIPT_ROOT/lib/buildvars  
 if [ ! -r $BUILDINFO_FILE ]; then  
     echo "Error! Unable to read escript build information. Exiting."  
     exit 1  
 fi  
61    
 function get_buildvar {  
     echo `grep "^$1=" $BUILDINFO_FILE |cut -d= -f2`  
 }  
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"
# Line 82  EXTRA_LD_LIBRARY_PATH=$ESCRIPT_ROOT/lib Line 74  EXTRA_LD_LIBRARY_PATH=$ESCRIPT_ROOT/lib
74    
75  if [ $STANDALONE -eq 1 ]  if [ $STANDALONE -eq 1 ]
76  then  then
77      EXTRA_PATH=$ESCRIPT_PARENT/pkg/python/bin:$EXTRA_PATH      EXTRA_PATH=$ESCRIPT_PARENT/pkg/python/bin:$ESCRIPT_PARENT/pkg/scons/bin:$EXTRA_PATH
78      EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/boost/lib:$ESCRIPT_PARENT/pkg/netcdf/lib/:$EXTRA_LD_LIBRARY_PATH      EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/boost/lib:$ESCRIPT_PARENT/pkg/netcdf/lib/:$EXTRA_LD_LIBRARY_PATH
79      EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH      EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH
80      EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/python/lib:$EXTRA_LD_LIBRARY_PATH      EXTRA_LD_LIBRARY_PATH=$ESCRIPT_PARENT/pkg/python/lib:$EXTRA_LD_LIBRARY_PATH
81      EXTRA_PYTHONPATH=$ESCRIPT_PARENT/pkg/numpy/lib/python2.6/site-packages:$ESCRIPT_PARENT/pkg/matplotlib/lib/python2.6/site-packages:$EXTRA_PYTHONPATH      EXTRA_PYTHONPATH=$ESCRIPT_PARENT/pkg/numpy/lib/python2.6/site-packages:$ESCRIPT_PARENT/pkg/matplotlib/lib/python2.6/site-packages:$EXTRA_PYTHONPATH
82  fi  fi
83    
84    
85    BUILDINFO_FILE=$ESCRIPT_ROOT/lib/buildvars
86    if [ ! -r $BUILDINFO_FILE ]; then
87        if [ "$1" = "-e" ];then
88        echo "export LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:\$LD_LIBRARY_PATH"
89        echo "export PYTHONPATH=$EXTRA_PYTHONPATH:\$PYTHONPATH"
90        echo "export PATH=$EXTRA_PATH:\$PATH"
91        if [ "`uname`" = "Darwin" ]
92        then
93            echo "export DYLD_LIBRARY_PATH=$EXTRA_DYLD_LIBRARY_PATH:$EXTRA_LD_LIBRARY_PATH:\$DYLD_LIBRARY_PATH"
94        fi  
95            exit 0
96        fi
97        echo "Error! Unable to read escript build information. Exiting."
98        exit 1
99    fi
100    
101    function get_buildvar {
102        echo `grep "^$1=" $BUILDINFO_FILE |cut -d= -f2`
103    }
104    
105  #  #
106  #   Add VisIt paths if required  #   Add VisIt paths if required
107  #  #
# Line 349  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`      compversion=`get_buildvar python_version | cut -d. -f1,2`
366      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d.%d"%(sys.version_info[0], sys.version_info[1], sys.version_info[2])'`      intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d"%(sys.version_info[0], sys.version_info[1])'`
367      if [ "$compversion" != "$intversion" ]      if [ "$compversion" != "$intversion" ]
368      then      then
369          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.3259  
changed lines
  Added in v.3340

  ViewVC Help
Powered by ViewVC 1.1.26