cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYTHONHOME=\${INSTALL_ROOT}/${PRODUCT}
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
-export PYTHONPATH=\${PYTHONHOME}/lib/python2.2:\${PYTHONPATH}
export PATH=\${PYTHONHOME}/bin:\${PATH}
-export LD_LIBRARY_PATH=\${PYTHONHOME}/lib/python2.2:\${LD_LIBRARY_PATH}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
+export PYTHONPATH=\${PYTHONHOME}/lib/python\${PYTHON_VERSION}:\${PYTHONPATH}
##
EOF
(test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
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}/lib/python2.2 ${pythonhome}/lib/python2.2 \${PYTHONPATH} ${PYTHONPATH}";
+ 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}";
pythonpath=`sort_path ${tmp}`
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export PYTHONHOME=${pythonhome}
-export PYTHON_INCLUDE=\${PYTHONHOME}/include/python2.2
+export PATH=${path}
+export PYTHON_VERSION=\`python -c "import sys; print sys.version[:3]"\`
+export PYTHON_INCLUDE=\${PYTHONHOME}/include/python\${PYTHON_VERSION}
export PYTHONPATH=${pythonpath}
##
EOF
# vsr: not compiled on RedHat8.0 without libstdc++.so
sed -e 's%LIBS= -ldl -lpthread -lutil%LIBS= -ldl -lpthread -lutil -lstdc++%g' Makefile > Makefile_new
mv -f Makefile_new Makefile
+# vsr: socket module is not compiled on RedHat9 because of absent KERBEROS include/libs flags
+sed -e "s%\[('USE_SSL',1)\]%\[('USE_SSL',1),('OPENSSL_NO_KRB5',None)\]%g" setup.py > setup_new.py
+mv -f setup_new.py setup.py
GCC=`which gcc`
cat >> ${PRODUCT_DIR}/MAKE.LOG <<EOF
used gcc=$GCC