- if [ "`${pythonhome}/bin/python -V 2>&1`" == "Python 2.2.1" ] ; then
- tmp="\${PYTHONHOME}/lib/python2.2 ${pythonhome}/lib/python2.2 \${PYTHONPATH} ${PYTHONPATH}";
+ # get version number: <major>, <minor> and <release>
+ # <major> and <minor> numbers are checked strickly, but <release> number can be larger than required one
+ # version number is calculated as: <major>*10000+<minor>*100+<release>
+ # e.g. for Python 2.2.1 it is equal to 20201
+ ver=`python -V 2>&1`
+ maj_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>0) print $1; else print 0}'`
+ min_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>1) print $2; else print 0}'`
+ rel_ver=`echo $ver | awk '{print $2}' | awk -F. '{if(NF>2) print $3; else print 0}'`
+ let ver=$maj_ver*10000+$min_ver*100+$rel_ver
+ if [ $ver -ge 20201 ] ; then
+# if [ "`${pythonhome}/bin/python -V 2>&1`" == "Python 2.2.1" ] ; then
+ tmp="\${PYTHONHOME}/bin ${pythonhome}/bin \${PATH} ${PATH}";
+ path=`sort_path ${tmp}`
+ tmp="\${PYTHONHOME}/lib/python\${PYTHON_VERSION} ${pythonhome}/lib/python${maj_ver}.${min_ver} \${PYTHONPATH} ${PYTHONPATH}";