From 30984e02b5a97500066f9f8c302532d4c0479de4 Mon Sep 17 00:00:00 2001 From: asozinov Date: Mon, 19 Dec 2022 10:38:27 +0300 Subject: [PATCH] add sam module for SHAPER use branch asozinov/32539 --- applications/SALOME-master-MPI.pyconf | 3 ++- applications/SALOME-master-native.pyconf | 3 ++- applications/SALOME-master-windows.pyconf | 3 ++- applications/SALOME-master.pyconf | 3 ++- products/compil_scripts/sam.bat | 22 ++++++++++++++++++ products/env_scripts/sam.py | 14 ++++++++++++ products/sam.pyconf | 28 +++++++++++++++++++++++ 7 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 products/compil_scripts/sam.bat create mode 100644 products/env_scripts/sam.py create mode 100644 products/sam.pyconf diff --git a/applications/SALOME-master-MPI.pyconf b/applications/SALOME-master-MPI.pyconf index c325110..6c72b1a 100644 --- a/applications/SALOME-master-MPI.pyconf +++ b/applications/SALOME-master-MPI.pyconf @@ -116,6 +116,7 @@ APPLICATION : requests : '2.19.1' rkCommon : '1.5.1' root: '6.22.02' + sam : '10-doc-constraints' salome_system : 'native' scipy : '1.4.1' scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'} @@ -142,7 +143,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/32539' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : 'V2_4_6' diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index a97dcf0..efea573 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -113,6 +113,7 @@ APPLICATION : requests : 'native' rkCommon : '1.5.1' root: '6.22.02' + sam : '10-doc-constraints' scipy : 'native' scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'} setuptools : 'native' @@ -139,7 +140,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/32539' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : 'V2_4_6' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 76df6a2..3083a19 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -108,6 +108,7 @@ APPLICATION : requests : '2.22.0' rkCommon : '1.5.1' ruby : '2.5.5-1' + sam : '10-doc-constraints' scipy : '1.4.1' setuptools : '41.0.1' sip : '5.5.0' @@ -135,7 +136,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/32539' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : {tag :'V2_4_6'} diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index 3868188..7d8921e 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -116,6 +116,7 @@ APPLICATION : requests : '2.19.1' rkCommon : '1.5.1' root: '6.22.02' + sam : '10-doc-constraints' salome_system : 'native' scipy : '1.4.1' scotch : {tag: '6.1.2', section: 'version_6_1_2_MPI', hpc: 'yes', base: 'no'} @@ -142,7 +143,7 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' + 'SHAPER' : 'asozinov/32539' 'SHAPERSTUDY' 'RESTRICTED' 'LIBBATCH' : 'V2_4_6' diff --git a/products/compil_scripts/sam.bat b/products/compil_scripts/sam.bat new file mode 100644 index 0000000..34f6725 --- /dev/null +++ b/products/compil_scripts/sam.bat @@ -0,0 +1,22 @@ +@echo off + +echo ########################################################################## +echo SAM +echo ########################################################################## + +if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% +REM clean BUILD directory +if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% +mkdir %BUILD_DIR% + +cd %SOURCE_DIR% + +xcopy sam %PRODUCT_INSTALL%\sam /E /I /Q +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on xcopy sam + exit 1 +) + +echo. +echo ########## END + diff --git a/products/env_scripts/sam.py b/products/env_scripts/sam.py new file mode 100644 index 0000000..c574272 --- /dev/null +++ b/products/env_scripts/sam.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os.path +import platform + +def set_env(env, prereq_dir, version): + env.set('SAMHOME', prereq_dir) + env.set('SAM_ROOT_DIR', prereq_dir) + env.prepend('PYTHONPATH', env.get('SAMHOME')) + +def set_nativ_env(env): + env.set('SAM_ROOT_DIR', '/usr') # update for cmake + env.set('SAMHOME', '/usr') diff --git a/products/sam.pyconf b/products/sam.pyconf new file mode 100644 index 0000000..cd83c56 --- /dev/null +++ b/products/sam.pyconf @@ -0,0 +1,28 @@ +default : +{ + name : "sam" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : [] + rpm_dev : [] + apt : [] + apt_dev : [] + } + environ : + { + env_script : $name + ".py" + } + archive_info : {archive_name : "sam.tar.gz"} + depend : [] + build_depend : [] + 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" + } +} -- 2.39.2