4 check_lib_version happydoc $PATH
5 if [ "$?" -ne "0" ]; then
9 if [ "$?" -eq "0" ]; then
10 ver=`happydoc | grep "HappyDoc version 2.1"`
11 ver=`happydoc | grep "HappyDoc version 2.1" | sort -u | awk '{print $NF}'`
12 if [ "$ver" == "2.1" ]; then
20 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
21 #$DELIM ${PRODUCT_TYPE} $DELIM
22 export PATH=\${INSTALL_ROOT}/${PRODUCT}/bin:\${PATH}
23 export PYTHONPATH=\${INSTALL_ROOT}/${PRODUCT}/lib/python\${PYTHON_VERSION}/site-packages:\${PYTHONPATH}
26 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
27 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
30 # looks for the native product and collects it's environment (used by make_env())
32 happydoc="`find_in_path happydoc ${PATH}`"
33 if [ -n "${happydoc}" ] ; then
34 cat > ${INSTALL_WORK}/try_native.py <<EOF
39 except ImportError, r :
42 python ${INSTALL_WORK}/try_native.py
43 if [ $? -eq 0 ] ; then
44 tmp="${happydoc} ${happydoc} \${PATH} ${PATH}";
45 path=`sort_path ${tmp}`
46 pythonpath="`find_in_path happydocset ${PYTHONPATH}`"
47 tmp="${pythonpath} ${pythonpath} \${PYTHONPATH} ${PYTHONPATH}";
48 pythonpath=`sort_path ${tmp}`
49 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
50 #$DELIM ${PRODUCT_TYPE} $DELIM
52 export PYTHONPATH=${pythonpath}
55 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
56 rm -f ${INSTALL_WORK}/try_native.py
60 rm -f ${INSTALL_WORK}/try_native.py
65 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
71 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
72 source ${INSTALL_WORK}/$SHRC
74 check_jb tar xfz ${SOURCE_DIR}/HappyDoc_r2_1.tar.gz -C ${INSTALL_WORK}
77 makedir ${PRODUCT_DIR}
78 check_job ${PRODUCT_DIR}/INSTALL.LOG python setup.py install --prefix=${PRODUCT_DIR}
79 #file_pth=${PRODUCT_DIR}/lib/python\${PYTHON_VERSION}/site-packages/happydoclib.pth
80 #if [ ! -f ${file_pth} ] ; then
82 # cat > ${file_pth} <<EOF
87 #du -sk ${PRODUCT_WORK} > ${PRODUCT_DIR}/size.log
88 cd ${PRODUCT_DIR}; rm -fr ${PRODUCT_WORK}
94 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
95 source ${INSTALL_WORK}/$SHRC
97 check_jb tar xfz ${SOURCE_DIR}/HappyDoc-r2_1.tar.gz -C ${INSTALL_ROOT}
103 export INSTALL_WORK=$2;
104 export SOURCE_DIR=$3;
105 export INSTALL_ROOT=$4;
106 export PRODUCT_SEQUENCE=$5;
107 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="happydoc" ; fi
108 export PRODUCT="HappyDoc-r2_1"
109 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
110 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}