check_version()
{
-if [ -n "$SIPDIR" ]; then
- check_lib_version sip ${SIPDIR}
- if [ "$?" -eq "0" ]; then
- check_lib_version libsip.so.9.1.0 ${SIPDIR}
- if [ "$?" -eq "0" ]; then
- return 0
- fi
+if [ -n "${SIPDIR}" ]; then
+ sip_ver=`${SIPDIR}/sip -V | awk '{print $1}'`
+ if [ "$sip_ver" == "3.3.2" ]; then
+ return 0
fi
fi
return 1
cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
#$DELIM ${PRODUCT_TYPE} $DELIM
export SIPDIR=\${INSTALL_ROOT}/${PRODUCT}
-export PYTHONPATH=\${SIPDIR}:\${PYTHONPATH}
export PATH=\${SIPDIR}:\${PATH}
+export PYTHONPATH=\${SIPDIR}:\${PYTHONPATH}
export LD_LIBRARY_PATH=\${SIPDIR}:\${LD_LIBRARY_PATH}
##
EOF
sipdir="`find_in_path sip /usr/bin`"
fi
if [ -n "${sipdir}" ] ; then
+ python_version="`python -c 'import sys; print sys.version[:3]'`"
sippython="`find_in_path libsip.so.9.1.0 ${PYTHONPATH}`"
if [ -z "${sippython}" ] ; then
- sippython="`find_in_path libsip.so.9.1.0 /usr/lib/python2.2/site-packages`"
+ sippython="`find_in_path libsip.so.9.1.0 /usr/lib/python${python_version}/site-packages`"
fi
if [ -n ${sippython} ]; then
tmp="${sipdir} ${sipdir} \${PATH} ${PATH}";