From: Nabil Ghodbane Date: Thu, 28 Sep 2023 07:25:24 +0000 (+0200) Subject: bos #34671: Rocky 8: ensure libOT.so links to clbas. Use pip instead of python such... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4dd5118667ff9401dcbbb7a5b74f1c68d0c1696b;p=tools%2Fsat_salome.git bos #34671: Rocky 8: ensure libOT.so links to clbas. Use pip instead of python such that installed scikit is used when generating the egg file --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index bae1cf2..b050f36 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -263,6 +263,7 @@ __overwrite__ : 'APPLICATION.products.statsmodels' : {tag: '0.6.1', base: 'no', section: 'version_0_6_1_no_pip' } 'APPLICATION.products.gdal' : {tag:'2.4.0', base: 'no', section: 'version_2_4_0_CO8' } # spns #29324 'APPLICATION.products.swig' : '4.0.2' + 'APPLICATION.products.openturns' : {tag: '1.21', base: 'no', section: 'version_1_21_RO8' } } { __condition__ : "VARS.dist in ['FD32']" diff --git a/products/compil_scripts/openturns-1.21.sh b/products/compil_scripts/openturns-1.21.sh index 3a05fa2..071408e 100755 --- a/products/compil_scripts/openturns-1.21.sh +++ b/products/compil_scripts/openturns-1.21.sh @@ -365,18 +365,26 @@ if [[ -d "$SOURCE_DIR/otfftw-0.13" ]]; then cd ${BUILD_DIR}/$k cp -R $SOURCE_DIR/$k-${OTP[$k]}/* . # - $PYTHONBIN setup.py build - if [ $? -ne 0 ] - then - echo "ERROR on ${PYTHONBIN} setup.py build" - exit 4 - fi - # - $PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL - if [ $? -ne 0 ] - then - echo "ERROR on ${PYTHONBIN} setup.py install --prefix=$PRODUCT_INSTALL" - exit 5 + if [ $k == "otpod" ]; then + ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ]; then + echo "ERROR on ${PYTHONBIN} -m pip install --cache-dir=$BUILD_DIR/cache/pip . --no-deps --prefix=$PRODUCT_INSTALL" + exit 4 + fi + else + $PYTHONBIN setup.py build + if [ $? -ne 0 ] + then + echo "ERROR on ${PYTHONBIN} setup.py build" + exit 4 + fi + # + $PYTHONBIN setup.py install --prefix=$PRODUCT_INSTALL + if [ $? -ne 0 ] + then + echo "ERROR on ${PYTHONBIN} setup.py install --prefix=$PRODUCT_INSTALL" + exit 5 + fi fi done diff --git a/products/openturns.pyconf b/products/openturns.pyconf index 1edab05..f1fd4e6 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -39,7 +39,7 @@ default_win : version_1_21 : { compil_script : "openturns-1.21.sh" - patches : ['openturns-1.21.0001.patch'] + patches : ['openturns-1.21.0001.patch', 'openturns-1.21.0005.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] opt_depend : ['pandas', 'statsmodels', 'patsy'] } @@ -60,10 +60,18 @@ version_1_21_win : } } +version_1_21_RO8 : +{ + compil_script : "openturns-1.21.sh" + patches : ['openturns-1.21.0001.patch','openturns-1.21.0005.patch', openturns-1.21.0006.patch'] + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] + opt_depend : ['pandas', 'statsmodels', 'patsy'] +} + version_1_21_CO8 : { compil_script : "openturns-1.21.sh" - patches : ['openturns-1.21.0002.patch'] + patches : ['openturns-1.21.0002.patch', 'openturns-1.21.0005.patch'] depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'cminpack', 'FMILibrary', 'PyFMI', 'boost'] opt_depend : ['pandas', 'statsmodels', 'patsy'] } diff --git a/products/patches/openturns-1.21.0005.patch b/products/patches/openturns-1.21.0005.patch new file mode 100644 index 0000000..5658d42 --- /dev/null +++ b/products/patches/openturns-1.21.0005.patch @@ -0,0 +1,11 @@ +--- openturns_ref/otpod-0.6.10/setup.py 2023-09-27 10:10:35.955815409 +0200 ++++ openturns_dev/otpod-0.6.10/setup.py 2023-09-27 10:10:22.311812375 +0200 +@@ -12,7 +12,7 @@ + + install_requires=['statsmodels>=0.6.1', + 'numpy>=1.10.4', +- 'scikit-learn>=0.17', ++ 'scikit-learn==0.24.2', + 'matplotlib>=1.5.1', + 'scipy>=0.17.0', + 'decorator>=4.0.9'] diff --git a/products/patches/openturns-1.21.0006.patch b/products/patches/openturns-1.21.0006.patch new file mode 100644 index 0000000..f06c5f9 --- /dev/null +++ b/products/patches/openturns-1.21.0006.patch @@ -0,0 +1,11 @@ +--- openturns-1.21_ref/openturns-1.21/lib/src/CMakeLists.txt 2023-09-13 14:59:41.000000000 +0200 ++++ openturns-1.21_dev/openturns-1.21/lib/src/CMakeLists.txt 2023-09-28 09:07:58.286148187 +0200 +@@ -93,7 +93,7 @@ + add_dependencies (OT generate_csv_parser) + endif () + +-target_link_libraries (OT PUBLIC ${OPENTURNS_LIBRARIES}) ++target_link_libraries (OT PUBLIC ${OPENTURNS_LIBRARIES} ${BLAS_LIBRARIES} ${CBLAS_LIBRARIES}) + target_link_libraries (OT PRIVATE ${OPENTURNS_PRIVATE_LIBRARIES}) + + target_include_directories (OT INTERFACE $)