From: Nabil Ghodbane Date: Sun, 27 Feb 2022 12:06:04 +0000 (+0100) Subject: spns #26828: convergence EDF: PERSALYS documentation requires and additional prerequi... X-Git-Tag: V9_9_0~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=665c44410878e39f953016a34ac23e2db287bef2;p=tools%2Fsat_salome.git spns #26828: convergence EDF: PERSALYS documentation requires and additional prerequisite: python3-numpydoc --- diff --git a/products/PERSALYS.pyconf b/products/PERSALYS.pyconf index b9624d6..276ee88 100644 --- a/products/PERSALYS.pyconf +++ b/products/PERSALYS.pyconf @@ -21,19 +21,21 @@ default : 'eigen', 'netcdf', 'gdal', - 'ADAO', 'boost', + 'ADAO', 'KERNEL', 'GUI', 'Sphinx', 'qwt', + 'openturns', + 'numpydoc', 'YACS', 'YDEFX', 'CAS', 'CONFIGURATION' ] build_depend : ["cmake", "swig"] - opt_depend : ['openmpi', 'openturns'] + opt_depend : ['openmpi'] patches : [] source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name @@ -50,9 +52,8 @@ default_win : properties : { single_install_dir : "yes" + incremental : "yes" } - depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads', 'netcdf', 'gdal'] - opt_depend : [] } version_v11_0 : diff --git a/products/compil_scripts/PERSALYS-v11.0.sh b/products/compil_scripts/PERSALYS-v11.0.sh index f702922..4789dc0 100755 --- a/products/compil_scripts/PERSALYS-v11.0.sh +++ b/products/compil_scripts/PERSALYS-v11.0.sh @@ -13,35 +13,46 @@ fi CMAKE_OPTIONS="" CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=$PRODUCT_INSTALL" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" CMAKE_OPTIONS+=" -DADAO_ROOT_DIR=$ADAO_ROOT_DIR" CMAKE_OPTIONS+=" -DADAO_INTERFACE_ROOT_DIR=$ADAO_INTERFACE_ROOT_DIR" -CMAKE_OPTIONS+=" -DBOOST_ROOT:PATH=${BOOST_ROOT_DIR}" +CMAKE_OPTIONS+=" -DBOOST_ROOT:PATH=$BOOST_ROOT_DIR" CMAKE_OPTIONS+=" -DGUI_ROOT_DIR=$GUI_ROOT_DIR" +CMAKR_OPTIONS+=" -DSalomeGUI_DIR=$GUI_ROOT_DIR/salome_adm/cmake_files" CMAKE_OPTIONS+=" -DKERNEL_ROOT_DIR=$KERNEL_ROOT_DIR" +CMAKR_OPTIONS+=" -DSalomeKERNEL_DIR=$KERNEL_ROOT_DIR/salome_adm/cmake_files" CMAKE_OPTIONS+=" -DOpenTURNS_DIR=$OPENTURNS_ROOT_DIR" CMAKE_OPTIONS+=" -DPY2CPP_ROOT_DIR=$PY2CPP_ROOT_DIR" +CMAKE_OPTIONS+=" -DPy2cpp_DIR=$PY2CPP_ROOT_DIR//lib/cmake/py2cpp" CMAKE_OPTIONS+=" -DPYTHON_ROOT_DIR=$PYTHON_ROOT_DIR" -CMAKE_OPTIONS+=" -DQWT_LIBRARY=$QWT_ROOT_DIR/lib/libqwt.so" -CMAKE_OPTIONS+=" -DQWT_INCLUDE_DIR=$QWT_ROOT_DIR/include" +if [ "$QWT_ROOT_DIR" != "/usr" ]; then + CMAKE_OPTIONS+=" -DQWT_LIBRARY=$QWT_ROOT_DIR/lib/libqwt.so" + CMAKE_OPTIONS+=" -DQWT_INCLUDE_DIR=$QWT_ROOT_DIR/include" +fi CMAKE_OPTIONS+=" -DSPHINX_ROOT_DIR=$SPHINX_ROOT_DIR" CMAKE_OPTIONS+=" -DYACS_ROOT_DIR=$YACS_ROOT_DIR" +CMAKR_OPTIONS+=" -DSalomeYACS_DIR=$YACS_ROOT_DIR/salome_adm/cmake_files" CMAKE_OPTIONS+=" -DYDEFX_ROOT_DIR=$YDEFX_ROOT_DIR" +CMAKE_OPTIONS+=" -Dydefx_DIR=$YDEFX_ROOT_DIR/salome_adm/cmake_files" CMAKE_OPTIONS+=" -DAdaoCppLayer_INCLUDE_DIR=$ADAO_INTERFACE_ROOT_DIR/include" CMAKE_OPTIONS+=" -DAdaoCppLayer_ROOT_DIR=$ADAO_INTERFACE_ROOT_DIR" CMAKE_OPTIONS+=" -DUSE_SALOME=ON" CMAKE_OPTIONS+=" -DGDAL_LIBRARY=$GDALHOME/lib/libgdal.so" CMAKE_OPTIONS+=" -DGDAL_INCLUDE_DIR=$GDALHOME/include" -if [ ! -z "$TBB_ROOT_DIR" ]; then +if [ ! -z "$TBB_ROOT" ]; then CMAKE_OPTIONS+=" -DTBB_ROOT=$TBB_ROOT_DIR" CMAKE_OPTIONS+=" -DTBB_INCLUDE_DIR=$TBB_ROOT_DIR/include" fi CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=$PYTHONBIN" CMAKE_OPTIONS+=" -DOTGUI_PYTHON_VERSION=$PYTHON_VERSION" + CMAKE_OPTIONS+=" -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE" -CMAKE_OPTIONS+=" -DPYTHON_LIBRARY=$PYTHON_ROOT_DIR/lib/libpython$PYTHON_VERSION.so" +if [ "$PYTHON_ROOT_DIR" != "/usr" ]; then + CMAKE_OPTIONS+=" -DPYTHON_LIBRARY=$PYTHON_ROOT_DIR/lib/libpython$PYTHON_VERSION.so" +fi CMAKE_OPTIONS+=" -DCAS_ROOT_DIR=$CAS_ROOT_DIR" CMAKE_OPTIONS+=" -DSPHINX_ROOT_DIR:FILEPATH=$SPHINX_ROOT_DIR" -CMAKE_OPTIONS+=" -DSPHINX_EXECUTABLE:FILEPATH=${SPHINX_ROOT_DIR}/bin/sphinx-build" +CMAKE_OPTIONS+=" -DSPHINX_EXECUTABLE:FILEPATH=$SPHINX_ROOT_DIR/bin/sphinx-build" CMAKE_OPTIONS+=" -DCMAKE_FIND_ROOT_PATH=ON" CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE:PATH=$(which swig)" CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=\"$GUI_ROOT_DIR/adm_local/cmake_files;$KERNEL_ROOT_DIR/salome_adm/cmake_files;$OPENTURNS_HOME/lib/cmake/openturns;$PY2CPP_ROOT_DIR/lib/cmake/py2cpp/;$QWT_ROOT_DIR;$YACS_ROOT_DIR/adm/cmake;$YDEFX_ROOT_DIR/salome_adm/cmake_files;\"" diff --git a/products/env_scripts/numpydoc.py b/products/env_scripts/numpydoc.py new file mode 100644 index 0000000..c12c4b5 --- /dev/null +++ b/products/env_scripts/numpydoc.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform + +def set_env(env, prereq_dir, version): + env.set("NUMPYDOC_ROOT_DIR",prereq_dir) + pyver = 'python' + env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + +def set_nativ_env(env): + pass diff --git a/products/numpydoc.pyconf b/products/numpydoc.pyconf new file mode 100644 index 0000000..79874de --- /dev/null +++ b/products/numpydoc.pyconf @@ -0,0 +1,31 @@ +default : +{ + name : "numpydoc" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-numpydoc"] + rpm_dev : [] + apt : ["python3-numpydoc"] + apt_dev : [] + } + archive_info: + { + archive_name : $name + "-" + $APPLICATION.products.numpydoc + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'six', 'setuptools', 'numpy'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/patches/PERSALYS-v11-001.patch b/products/patches/PERSALYS-v11-001.patch index 84f3f29..13c0b22 100644 --- a/products/patches/PERSALYS-v11-001.patch +++ b/products/patches/PERSALYS-v11-001.patch @@ -1,27 +1,51 @@ --- PERSALYS_ref/CMakeLists.txt 2022-01-11 16:27:50.000000000 +0100 -+++ PERSALYS_new/CMakeLists.txt 2022-02-26 22:36:24.413388375 +0100 -@@ -27,6 +27,16 @@ ++++ PERSALYS_new/CMakeLists.txt 2022-02-27 12:45:01.757523273 +0100 +@@ -10,6 +10,10 @@ + option (USE_COTIRE "Use cotire for unity builds" OFF) + option (USE_PARAVIEW "use ParaView" ON) + set (PERSALYS_QT_VERSION 5 CACHE STRING "Qt version") ++SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") ++SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI") ++SET(YACS_ROOT_DIR $ENV{YACS_ROOT_DIR} CACHE PATH "Path to the Salome YACS") ++SET(ADAO_ROOT_DIR $ENV{ADAO_ROOT_DIR} CACHE PATH "Path to the Salome ADAO") + + # By default, build in Release mode. Must appear before project() command + if ( NOT DEFINED CMAKE_BUILD_TYPE ) +@@ -27,6 +31,17 @@ # set module dir to find custom scripts list ( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) +# Common CMake macros +# =================== -+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") -+IF(EXISTS ${CONFIGURATION_ROOT_DIR}) -+ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") -+ INCLUDE(SalomeMacros NO_POLICY_SCOPE) -+ELSE() -+ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") -+ENDIF() -+ ++if (USE_SALOME) ++ SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") ++ IF(EXISTS ${CONFIGURATION_ROOT_DIR}) ++ LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") ++ INCLUDE(SalomeMacros NO_POLICY_SCOPE) ++ ELSE() ++ MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ++ ENDIF() ++endif() if (USE_COTIRE) if (POLICY CMP0058) -@@ -63,6 +73,7 @@ +@@ -63,6 +78,9 @@ list (APPEND PERSALYS_DEFINITIONS "-DPERSALYS_STATIC -DPYINTERP_STATIC -DPYCONSOLE_STATIC") endif () -+FIND_PACKAGE(SalomeBoost REQUIRED) ++if (USE_SALOME) ++ FIND_PACKAGE(SalomeBoost REQUIRED) ++endif(USE_SALOME) find_package (Boost COMPONENTS filesystem locale REQUIRED) if (TARGET Boost::filesystem) set (Boost_LIBRARIES Boost::filesystem Boost::locale) +@@ -91,6 +109,9 @@ + endmacro () + endif () + ++ if (USE_SALOME) ++ find_package (SalomeQwt) ++ endif() + find_package (Qwt 6 REQUIRED) + + if (USE_PARAVIEW)