]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #26828: convergence EDF: PERSALYS documentation requires and additional prerequi...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Sun, 27 Feb 2022 12:06:04 +0000 (13:06 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Sun, 27 Feb 2022 12:06:04 +0000 (13:06 +0100)
products/PERSALYS.pyconf
products/compil_scripts/PERSALYS-v11.0.sh
products/env_scripts/numpydoc.py [new file with mode: 0644]
products/numpydoc.pyconf [new file with mode: 0644]
products/patches/PERSALYS-v11-001.patch

index b9624d695b0ad344cb8172a4500d33c4a4fb4eee..276ee88d566d001190647842abf47dbe10a73571 100644 (file)
@@ -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 :
index f70292267c1fe1349ec0740fc1e18b58db3310ee..4789dc07c93ae2a500d3e517ea21c65704bafe42 100755 (executable)
@@ -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 (file)
index 0000000..c12c4b5
--- /dev/null
@@ -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 (file)
index 0000000..79874de
--- /dev/null
@@ -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"
+    }
+}
index 84f3f297236eaf1cbee66c8929d149fe69241885..13c0b22e97022369ae358b4dfb18aa2fc0f5a554 100644 (file)
@@ -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)