From 5b14509945a776ed86390de1d0cb188a2c27c37a Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 27 Sep 2022 09:26:44 +0200 Subject: [PATCH] spns #32239: vetoe documentation generation - issue experienced by EDF as well --- applications/SALOME-master.pyconf | 6 +- products/PyQt.pyconf | 11 +++ products/Python.pyconf | 17 ++++- products/compil_scripts/Python-3.7.sh | 76 +++++++++++++++++++ .../{Python-3.9.14.sh => Python-3.9.sh} | 8 +- products/compil_scripts/gdal-2.4.4.sh | 69 +++++++++++++++++ products/compil_scripts/openturns-1.19.sh | 27 ++++++- products/compil_scripts/sip-6.6.2.sh | 62 +++++++++++++++ products/gdal.pyconf | 5 ++ products/sip.pyconf | 9 +++ products/statsmodels.pyconf | 20 ++++- 11 files changed, 294 insertions(+), 16 deletions(-) create mode 100755 products/compil_scripts/Python-3.7.sh rename products/compil_scripts/{Python-3.9.14.sh => Python-3.9.sh} (89%) create mode 100755 products/compil_scripts/gdal-2.4.4.sh create mode 100755 products/compil_scripts/sip-6.6.2.sh diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index d80c557..85bcdbe 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -87,8 +87,8 @@ APPLICATION : nose: '1.3.7' numpy : '1.16.4' numpydoc : '0.9.0' - omniORB : '4.2.2' - omniORBpy : '4.2.2' + omniORB : '4.2.5' + omniORBpy : '4.2.5' opencv : '3.2.0' openmpi : '3.1.6' openturns: '1.19' @@ -108,7 +108,6 @@ APPLICATION : pyparsing : '2.0.3' PyQt : '5.15.3' pyreadline : '2.0' - ##Python : '3.9.14' Python : '3.6.15' pytz : '2017.2' qt : '5.12.10' @@ -133,6 +132,7 @@ APPLICATION : tbb : '2019_U8' tcl : '8.6.0' tk : '8.6.0' + toml: '0.10.2' urllib3 : '1.23' zeromq: '4.3.1' URANIE : '4.5.0' diff --git a/products/PyQt.pyconf b/products/PyQt.pyconf index 7f7f9d8..3d91707 100644 --- a/products/PyQt.pyconf +++ b/products/PyQt.pyconf @@ -27,6 +27,17 @@ default : } } +version_5_15_7 : +{ + archive_info : {archive_name : "PyQt5-5.15.7.tar.gz"} + compil_script : "PyQt-5.15" + $VARS.scriptExtension +} + +version_5_15_7_win : +{ + depend : ['Python','setuptools', 'toml', 'sip', 'qt'] +} + version_5_15_3 : { compil_script : "PyQt-5.15" + $VARS.scriptExtension diff --git a/products/Python.pyconf b/products/Python.pyconf index 016d3aa..fc70b29 100755 --- a/products/Python.pyconf +++ b/products/Python.pyconf @@ -91,15 +91,28 @@ version_3_7_9_win : build_depend : ['perl'] } +version_3_7_14 : +{ + compil_script : "Python-3.7.sh" + patches : [] +} + +version_3_7_14_win : +{ + compil_script : "Python-3.9.bat" + patches : [] + build_depend : ['perl'] +} + version_3_9_14 : { - compil_script : "Python-3.9.14.sh" + compil_script : "Python-3.9.sh" patches : [] } version_3_9_14_win : { - compil_script : "Python-3.9.14.bat" + compil_script : "Python-3.9.bat" patches : [] build_depend : ['perl'] } diff --git a/products/compil_scripts/Python-3.7.sh b/products/compil_scripts/Python-3.7.sh new file mode 100755 index 0000000..d523a59 --- /dev/null +++ b/products/compil_scripts/Python-3.7.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +echo "##########################################################################" +echo "Python" $VERSION +echo "##########################################################################" + +PYTHON_VERSION=3.7 + +# --enable-shared : enable building shared python library +# --with-threads : enable thread support +# --without-pymalloc: disable specialized mallocs +# --with-ensurepip : installation using bundled pip +# --enable-optimizations: recommandé et utilisé par Nijni -> mais trop long! +CONFIGURE_ARGUMENTS="--enable-shared --with-threads --with-ensurepip=install --with-ssl --enable-loadable-sqlite-extensions --with-pymalloc" + +echo +echo "*** configure --prefix=$PRODUCT_INSTALL $CONFIGURE_ARGUMENTS" +$SOURCE_DIR/configure --prefix=$PRODUCT_INSTALL $CONFIGURE_ARGUMENTS +if [ $? -ne 0 ] +then + echo "ERROR on configure" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +cd ${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}* + +if [ ! -e libpython${PYTHON_VERSION}.so ] +then + echo + echo "*** create missing link" + ln -sf ../../libpython${PYTHON_VERSION}.so . + if [ $? -ne 0 ] + then + echo "ERROR when creating missing link" + # no error here + fi +fi +cd ${PRODUCT_INSTALL}/bin +ln -s python3 python +ln -s pip3 pip +# +if [ "${SAT_ENABLE_PYTHON_PYMALLOC}" == "1" ]; then + cd ${PRODUCT_INSTALL}/include + if [ ! -d python3.7 ]; then + ln -s python3.7m python3.7 + fi +fi + +# fix the path... +L="2to3 2to3-3.7 easy_install-3.7 idle3 idle3.7 pip3 pip3.7 pydoc3 pydoc3.7 pyvenv pyvenv-3.7" +cd ${PRODUCT_INSTALL}/bin +for f in $L; do + awk '$0 = NR==1 ? replace : $0' replace="#!/usr/bin/env python3" $f > $f.t && mv $f.t $f && chmod 755 $f +done + +echo +echo "########## END" + diff --git a/products/compil_scripts/Python-3.9.14.sh b/products/compil_scripts/Python-3.9.sh similarity index 89% rename from products/compil_scripts/Python-3.9.14.sh rename to products/compil_scripts/Python-3.9.sh index 19f0ad8..e534666 100755 --- a/products/compil_scripts/Python-3.9.14.sh +++ b/products/compil_scripts/Python-3.9.sh @@ -16,13 +16,7 @@ PYTHON_VERSION="${VERSION:0:3}" # --without-pymalloc: disable specialized mallocs # --with-ensurepip : installation using bundled pip # --enable-optimizations: recommandé et utilisé par Nijni -> mais trop long! -# spns #30153 : pymalloc on demand -CONFIGURE_ARGUMENTS="--enable-shared --with-threads --with-ensurepip=install --with-ssl --enable-loadable-sqlite-extensions" -if [ "${SAT_ENABLE_PYTHON_PYMALLOC}" == "1" ]; then - CONFIGURE_ARGUMENTS+=" --with-pymalloc" -else - CONFIGURE_ARGUMENTS+=" --without-pymalloc" -fi +CONFIGURE_ARGUMENTS="--enable-shared --with-threads --with-ensurepip=install --with-ssl --enable-loadable-sqlite-extensions --with-pymalloc" echo echo "*** configure --prefix=$PRODUCT_INSTALL $CONFIGURE_ARGUMENTS" diff --git a/products/compil_scripts/gdal-2.4.4.sh b/products/compil_scripts/gdal-2.4.4.sh new file mode 100755 index 0000000..675a456 --- /dev/null +++ b/products/compil_scripts/gdal-2.4.4.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +echo "##########################################################################" +echo "gdal" $VERSION +echo "##########################################################################" + +if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CXX=${MPI_CXX_COMPILER} + export CC=${MPI_C_COMPILER} +fi + +CONFIGURE_FLAGS= +CONFIGURE_FLAGS+=" --with-pcraster=internal" +CONFIGURE_FLAGS+=" --with-png=internal" +CONFIGURE_FLAGS+=" --with-libtiff=internal" +CONFIGURE_FLAGS+=" --with-geotiff=internal" +CONFIGURE_FLAGS+=" --with-jpeg=internal" +CONFIGURE_FLAGS+=" --with-gif=internal" +CONFIGURE_FLAGS+=" --with-python=yes" +CONFIGURE_FLAGS+=" --with-geos=yes" +CONFIGURE_FLAGS+=" --with-sqlite3=yes" +CONFIGURE_FLAGS+=" --with-threads" +CONFIGURE_FLAGS+=" --with-python=${PYTHONBIN}" +CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" +CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" + +if [[ "$DIST_NAME$DIST_VERSION" == "CO8" ]]; then + CONFIGURE_FLAGS+=" --without-jasper" +fi + +if [ ! -z "$LIBXML_ROOT_DIR" ]; then + CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" +fi +echo +echo "*** configure $CONFIGURE_FLAGS LDFLAGS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_ROOT_DIR}/lib -lnetcdf\" HDF5_CFLAGS=\"-I${HDF5HOME}/include -L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl\" LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf\" HDF5_LIBS=\"-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl \" HDF5_INCLUDE=\"-I${HDF5HOME}/include\"" + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR +cp -r $SOURCE_DIR/* $BUILD_DIR/ +cd $BUILD_DIR + +./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS LDFLAGS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf" HDF5_CFLAGS="-I${HDF5HOME}/include -L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl" LIBS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl -L${NETCDF_INSTALL_DIR}/lib -lnetcdf" HDF5_LIBS="-L${HDF5HOME}/lib/ -lhdf5 -lhdf5_hl " HDF5_INCLUDE="-I${HDF5HOME}/include" +if [ $? -ne 0 ] +then + echo "ERROR on configure" + exit 1 +fi +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" + diff --git a/products/compil_scripts/openturns-1.19.sh b/products/compil_scripts/openturns-1.19.sh index 9a8d4ac..4f43693 100755 --- a/products/compil_scripts/openturns-1.19.sh +++ b/products/compil_scripts/openturns-1.19.sh @@ -196,9 +196,30 @@ if [[ -d "$SOURCE_DIR/otfftw-0.12" ]]; then CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" elif [[ $k == "otfftw" ]]; then CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - elif [ $k == "otmorris" ] && [ "$DIST_NAME$DIST_VERSION" == "FD32" ]; then - CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" - CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + elif [[ $k == "otmorris" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac + elif [[ $k == "otrobopt" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac + elif [[ $k == "otsvm" ]]; then + case $LINUX_DISTRIBUTION in + DB*|FD*) + echo "WARNING: switching OFF documentation build" + CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" + CMAKE_EXTRA_OPTIONS+=" -DUSE_SPHINX=OFF" # missing package to be installed. + ;; + esac elif [[ $k == "otpmml" ]]; then CMAKE_EXTRA_OPTIONS+=" -DBUILD_DOC=OFF" fi diff --git a/products/compil_scripts/sip-6.6.2.sh b/products/compil_scripts/sip-6.6.2.sh new file mode 100755 index 0000000..8280153 --- /dev/null +++ b/products/compil_scripts/sip-6.6.2.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +echo "##########################################################################" +echo SIP + PyQt5_sip $VERSION +echo "##########################################################################" + + +echo "*** build in SOURCE directory" +cd $SOURCE_DIR/sip-6.6.2 + +# we don't install in python directory -> modify environment as described in INSTALL file +mkdir -p $PRODUCT_INSTALL/lib/python${PYTHON_VERSION}/site-packages +export PATH=$(pwd)/bin:$PATH +export PYTHONPATH=$(pwd):$PYTHONPATH +export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH + +echo +echo "*** build with $PYTHONBIN" +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on build" + exit 2 +fi + +echo +echo "*** install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 3 +fi + +cd $SOURCE_DIR/PyQt5_sip-12.11.0 + +echo +echo "*** build with $PYTHONBIN" +$PYTHONBIN setup.py build +if [ $? -ne 0 ] +then + echo "ERROR on build" + exit 2 +fi + +echo +echo "*** install with $PYTHONBIN" +$PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL +if [ $? -ne 0 ] +then + echo "ERROR on install" + exit 3 +fi + +mkdir $PRODUCT_INSTALL/include +cp *.h $PRODUCT_INSTALL/include + +cd $PRODUCT_INSTALL/bin +ln -sf sip5 sip + +echo +echo "########## END" diff --git a/products/gdal.pyconf b/products/gdal.pyconf index a04959f..bd324f5 100644 --- a/products/gdal.pyconf +++ b/products/gdal.pyconf @@ -32,6 +32,11 @@ default_win : opt_depend : [] } +version_2_4_4: +{ + compil_script : 'gdal-2.4.4' + $VARS.scriptExtension +} + version_2_4_0: { compil_script : 'gdal-2.4.0' + $VARS.scriptExtension diff --git a/products/sip.pyconf b/products/sip.pyconf index c489f25..bc84592 100644 --- a/products/sip.pyconf +++ b/products/sip.pyconf @@ -26,11 +26,20 @@ default : } } +version_6_6_2 : +{ + compil_script : 'sip-6.6.2' + $VARS.scriptExtension + archive_info : {archive_name : "sip-6.6.2-PyQt5_sip-12.11.0.tar.gz"} + patches : [] + depend : ['Python', 'qt', 'toml'] +} + version_5_5_0 : { compil_script : 'sip-5.5.0' + $VARS.scriptExtension archive_info : {archive_name : "sip-5.5.0-PyQt5_sip-12.8.1.tar.gz"} patches : ['sip-5.5.0-sipSetBool.patch'] + depend : ['Python', 'qt', 'toml'] } version_4_19_24 : diff --git a/products/statsmodels.pyconf b/products/statsmodels.pyconf index 1a3be2c..7bf5e44 100644 --- a/products/statsmodels.pyconf +++ b/products/statsmodels.pyconf @@ -15,7 +15,7 @@ default : { } - depend : ["Python", "setuptools","PyFMI"] + depend : ["Python", "setuptools","PyFMI", "numpy", "scipy", "matplotlib"] opt_depend : ['pandas', 'patsy'] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -27,6 +27,24 @@ default : } } +version_0_10_2: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + +version_0_9_0: +{ + properties: + { + incremental : "yes" + pip : "yes" + } +} + version_0_8_0: { properties: -- 2.39.2