4 check_lib_version happydoc ${PYTHONHOME}/bin
5 if [ "$?" -ne "0" ]; then
8 ver=`happydoc | grep "HappyDoc version 2.1"`
10 #echo "The product ${PRODUCT} has been already installed on yours system"
17 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
18 #$DELIM ${PRODUCT_TYPE} $DELIM
19 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
20 export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python2.2/site-packages:\${PYTHONPATH}
23 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
24 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
27 # looks for the native product and collects it's environment (used by make_env())
29 happydoc="`find_in_path happydoc ${PATH}`"
30 if [ -n "${happydoc}" ] ; then
31 cat > ${INSTALL_WORK}/try_native.py <<EOF
36 except ImportError, r :
39 python ${INSTALL_WORK}/try_native.py
40 if [ $? -eq 0 ] ; then
41 tmp="${happydoc} ${happydoc} \${PATH} ${PATH}";
42 path=`sort_path ${tmp}`
43 pythonpath="`find_in_path happydocset ${PYTHONPATH}`"
44 tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
45 pythonpath=`sort_path ${tmp}`
46 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
47 #$DELIM ${PRODUCT_TYPE} $DELIM
49 export PYTHONPATH=${pythonpath}
52 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
53 rm -f ${INSTALL_WORK}/try_native.py
57 rm -f ${INSTALL_WORK}/try_native.py
62 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
68 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
69 source ${INSTALL_WORK}/$SHRC
71 check_jb tar xfz ${SOURCE_DIR}/HappyDoc_r2_1.tar.gz -C ${INSTALL_WORK}
74 makedir ${PRODUCT_DIR}
75 check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR}
76 #file_pth=${PRODUCT_DIR}/lib/python2.2/site-packages/happydoclib.pth
77 #if [ ! -f ${file_pth} ] ; then
79 # cat > ${file_pth} <<EOF
84 rm -fr ${PRODUCT_WORK}
90 check_jb tar xfz ${SOURCE_DIR}/HappyDoc-r2_1.tar.gz -C ${INSTALL_ROOT}
96 export INSTALL_WORK=$2;
98 export INSTALL_ROOT=$4;
99 export PRODUCT_SEQUENCE=$5;
100 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="happydoc" ; fi
101 export PRODUCT="HappyDoc-r2_1"
102 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
103 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}