From: Bernard Sécherà Date: Mon, 8 Feb 2021 15:09:32 +0000 (+0100) Subject: conflict between utils.py from efficace and utils.py from solverlab X-Git-Tag: V9_7_0~43 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6e9592f6ca352bfee71ef3b67a24f100aa208d49;p=tools%2Fsolverlab.git conflict between utils.py from efficace and utils.py from solverlab --- diff --git a/CoreFlows/gui/CMakeLists.txt b/CoreFlows/gui/CMakeLists.txt index eeb4b94..ebdcb11 100644 --- a/CoreFlows/gui/CMakeLists.txt +++ b/CoreFlows/gui/CMakeLists.txt @@ -42,14 +42,14 @@ ELSE ( (EXISTS $ENV{CONFIGURATION_ROOT_DIR}) AND (EXISTS $ENV{KERNEL_ROOT_DIR}) @ONLY ) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/SalomePyQt_MockUp.py DESTINATION lib/python) - # Configure file utils.py + # Configure file slutils.py SET(SALOME_INSTALL_PYTHON "lib/python"${PYTHON_VERSION}"/site-packages/salome")#This is to use the same variable as salome configure_file( - utils.py.in - utils.py + slutils.py.in + slutils.py @ONLY ) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/utils.py DESTINATION lib/python) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/slutils.py DESTINATION lib/python) ENDIF( (EXISTS $ENV{CONFIGURATION_ROOT_DIR}) AND (EXISTS $ENV{KERNEL_ROOT_DIR}) AND (EXISTS $ENV{GUI_ROOT_DIR}) ) ADD_SUBDIRECTORY(ui) diff --git a/CoreFlows/gui/salome/src/CMakeLists.txt b/CoreFlows/gui/salome/src/CMakeLists.txt index eb1ac54..08c51af 100755 --- a/CoreFlows/gui/salome/src/CMakeLists.txt +++ b/CoreFlows/gui/salome/src/CMakeLists.txt @@ -20,7 +20,7 @@ SET(SGPYQT_RES_DIR "${SALOME_INSTALL_RES}") SALOME_CONFIGURE_FILE(../../SalomePyQt_MockUp.py.in mockup/SalomePyQt_MockUp.py) -SALOME_CONFIGURE_FILE(../../utils.py.in utils.py) +SALOME_CONFIGURE_FILE(../../slutils.py.in slutils.py) SET(_bin_SCRIPTS SOLVERLABGUI.py @@ -30,7 +30,7 @@ SET(_bin_SCRIPTS SET(_lib_SCRIPTS ${GUI_lib_SCRIPTS} ${CMAKE_CURRENT_BINARY_DIR}/mockup/SalomePyQt_MockUp.py - ${CMAKE_CURRENT_BINARY_DIR}/utils.py + ${CMAKE_CURRENT_BINARY_DIR}/slutils.py ) SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON}) diff --git a/CoreFlows/gui/slutils.py.in b/CoreFlows/gui/slutils.py.in new file mode 100755 index 0000000..9ba0f55 --- /dev/null +++ b/CoreFlows/gui/slutils.py.in @@ -0,0 +1,8 @@ +def completeResPath(fileName): + import os + subPath = "@SALOME_INSTALL_PYTHON@" + rd = os.environ.get("SOLVERLAB_ROOT_DIR", None) + if rd is None: + raise Exception("SOLVERLAB_ROOT_DIR is not defined!") + filePath = os.path.join(rd, subPath, fileName) + return filePath diff --git a/CoreFlows/gui/ui/MainCFWidget.py b/CoreFlows/gui/ui/MainCFWidget.py index 9e01f49..64a5dcf 100755 --- a/CoreFlows/gui/ui/MainCFWidget.py +++ b/CoreFlows/gui/ui/MainCFWidget.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from PyQt5 import QtWidgets, QtCore from PyQt5.uic import loadUi -from utils import completeResPath +from slutils import completeResPath import CoreFlows as cf import cdmath as cm diff --git a/CoreFlows/gui/utils.py.in b/CoreFlows/gui/utils.py.in deleted file mode 100755 index 9ba0f55..0000000 --- a/CoreFlows/gui/utils.py.in +++ /dev/null @@ -1,8 +0,0 @@ -def completeResPath(fileName): - import os - subPath = "@SALOME_INSTALL_PYTHON@" - rd = os.environ.get("SOLVERLAB_ROOT_DIR", None) - if rd is None: - raise Exception("SOLVERLAB_ROOT_DIR is not defined!") - filePath = os.path.join(rd, subPath, fileName) - return filePath