From: vsr Date: Mon, 4 Oct 2021 09:34:33 +0000 (+0300) Subject: bos #26458 Versioning of sources via git commit id (sha1) X-Git-Tag: V9_8_0a1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d05586cb12a0e9e0e1fc546107193febd0c3d818;p=modules%2Fparavis.git bos #26458 Versioning of sources via git commit id (sha1) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c95b392..6e39cbac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,25 +18,19 @@ # CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR) INCLUDE(CMakeDependentOption) + +# Project name +# ============ +# original PROJECT(SalomePARAVIS C CXX) +# upper case +STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) IF(WIN32) STRING( REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ) SET( CMAKE_SHARED_LINKER_FLAGS_DEBUG "${replacementFlags}" ) ENDIF(WIN32) -# Versioning -# =========== -# Project name, upper case -STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) - -SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 7) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) -SET(${PROJECT_NAME_UC}_VERSION - ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) -SET(${PROJECT_NAME_UC}_VERSION_DEV 1) - # Common CMake macros # =================== SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") @@ -47,6 +41,11 @@ ELSE() MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ENDIF() +# Versioning +# =========== +SALOME_SETUP_VERSION(9.7.0 DEVELOPMENT) +MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"") + # Find KERNEL # =========== SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") @@ -270,7 +269,6 @@ ADD_SUBDIRECTORY(idl) # Header configuration # ==================== -SALOME_XVERSION(${PROJECT_NAME}) SALOME_CONFIGURE_FILE(PARAVIS_version.h.in PARAVIS_version.h INSTALL ${SALOME_INSTALL_HEADERS}) # Configuration export diff --git a/bin/VERSION.in b/bin/VERSION.in index 4ae7cd6b..d00e7eb2 100644 --- a/bin/VERSION.in +++ b/bin/VERSION.in @@ -1,3 +1,4 @@ [SALOME PARAVIS] : @SALOMEPARAVIS_VERSION@ [DEVELOPMENT] : @SALOMEPARAVIS_VERSION_DEV@ [DESCRIPTION] : SALOME ParaVis (Paraview-based post-processing) module +[SHA1] : @SALOMEPARAVIS_GIT_SHA1@ diff --git a/src/PV_SWIG/CMakeLists.txt b/src/PV_SWIG/CMakeLists.txt index 0751c59b..507910fa 100644 --- a/src/PV_SWIG/CMakeLists.txt +++ b/src/PV_SWIG/CMakeLists.txt @@ -34,3 +34,4 @@ ELSE(SALOME_LIGHT_ONLY) ENDIF(SALOME_LIGHT_ONLY) SALOME_INSTALL_SCRIPTS("${_PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON}) +SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/paravis) diff --git a/src/PV_SWIG/__init__.py b/src/PV_SWIG/__init__.py new file mode 100644 index 00000000..9551c192 --- /dev/null +++ b/src/PV_SWIG/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2010-2021 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +__version__ = "@SALOMEPARAVIS_GIT_SHA1@"