3 echo "##########################################################################"
5 echo "##########################################################################"
7 rm -Rf $PRODUCT_INSTALL
9 # WARNING $PYTHOSTARTUP can be problematic -> unset.
10 # If an error occurs during make install then the environement is "messy"
12 # check for readline library
13 # if NO_CHECK_READLINE is not set and readline is not found the script will exit
14 if [[ "x$NO_CHECK_READLINE" == "x" ]]
17 echo "*** check for readline library"
18 python -c "import readline" &> /dev/null
21 echo "ERROR readline library is not installed"
22 echo "set environement variable NO_CHECK_READLINE to skip checking for readline library"
25 echo "readline library found"
31 if [[ $DIST_NAME == "UB" ]]
33 export LDFLAGS="-L/usr/lib/x86_64-linux-gnu/"
34 echo "set LDFLAGS=$LDFLAGS"
37 ################################## Hack the bug with <Lib64> on OpenSuse
38 if [[ $DIST_NAME == "OS" ]]
41 echo "*** fix bug OpenSuse"
43 mkdir -p ${PRODUCT_INSTALL}
45 echo "*** create missing link ${PRODUCT_INSTALL}/lib ${PRODUCT_INSTALL}/lib64"
52 $SOURCE_DIR/configure --prefix=$PRODUCT_INSTALL --enable-shared --with-threads --without-pymalloc --enable-unicode=ucs4
55 echo "ERROR on configure"
60 echo "*** make" $MAKE_OPTIONS
69 echo "*** make install"
73 echo "ERROR on make install"
77 ######### link for salome
79 PYTHON_VERSION=`${PRODUCT_INSTALL}/bin/python -c "import sys; print sys.version[:3]"`
82 PYTHON_VERSION="${VERSION:0:3}"
85 cd ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/config
87 if [ ! -e libpython${PYTHON_VERSION}.so ]
90 echo "*** create missing link"
91 ln -sf ../../libpython${PYTHON_VERSION}.so .
94 echo "ERROR when creating missing link"
99 # changement des ent�tes
100 #cd $PRODUCT_INSTALL/bin
101 #for sc in idle pydoc smtpd.py ; do
102 # if [ -e $sc ] ; then
103 # sed -e "s%#\!.*python%#\!/usr/bin/env python%" "$sc" > _"$sc"
110 echo "########## END"