From: ageay Date: Thu, 4 Apr 2013 15:20:12 +0000 (+0000) Subject: MEDMEM suppression X-Git-Tag: EndAGWork4413~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0704c091fe149baa0292b07aa007b06d4c28e9ac;p=modules%2Fmed.git MEDMEM suppression --- diff --git a/src/MEDLoader/Swig/CMakeLists.txt b/src/MEDLoader/Swig/CMakeLists.txt index ebdd64576..98919949d 100644 --- a/src/MEDLoader/Swig/CMakeLists.txt +++ b/src/MEDLoader/Swig/CMakeLists.txt @@ -63,7 +63,8 @@ INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${ME SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDLoader_Swig.py) INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON}) -INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py DESTINATION ${MED_salomescript_PYTHON}) +INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py medutilities.py DESTINATION ${MED_salomescript_PYTHON}) +INSTALL(FILES med2sauv sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} ) ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py) ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py) diff --git a/src/MEDLoader/Swig/Makefile.am b/src/MEDLoader/Swig/Makefile.am index 24778a285..a1a8fd359 100644 --- a/src/MEDLoader/Swig/Makefile.am +++ b/src/MEDLoader/Swig/Makefile.am @@ -53,7 +53,7 @@ _MEDLoader_la_LDFLAGS = -module $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(PYTHON_LIBS) CLEANFILES = MEDLoader_wrap.cxx MEDLoader.py -dist_salomescript_DATA= MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py libMEDLoader_Swig.py +dist_salomescript_DATA= MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py libMEDLoader_Swig.py med2sauv sauv2med medutilities.py nodist_salomescript_DATA = MEDLoader.py -UNIT_TEST_PROG = MEDLoaderTest.py MEDLoaderTest2.py \ No newline at end of file +UNIT_TEST_PROG = MEDLoaderTest.py MEDLoaderTest2.py diff --git a/src/MEDLoader/Swig/med2sauv b/src/MEDLoader/Swig/med2sauv index 943ce34ca..511e19d51 100755 --- a/src/MEDLoader/Swig/med2sauv +++ b/src/MEDLoader/Swig/med2sauv @@ -23,6 +23,7 @@ from sys import argv,path from os.path import dirname,abspath,sep +from medutilities import med2sauv d = argv[0] d = dirname(d) diff --git a/src/MEDLoader/Swig/medutilities.py b/src/MEDLoader/Swig/medutilities.py index adf51ce0b..c53c98524 100644 --- a/src/MEDLoader/Swig/medutilities.py +++ b/src/MEDLoader/Swig/medutilities.py @@ -23,6 +23,14 @@ from MEDLoader import * +def my_remove(f): + from os import remove + try: + remove(f) + except OSError: + pass + return + def convert(file_in, driver_in, driver_out, format=1, file_out=None): # print file_in @@ -56,6 +64,8 @@ def convert(file_in, driver_in, driver_out, format=1, file_out=None): sw.setMEDFileDS(mfd,0);#0 ? sw.write(file_out) # + mesh = mfd.getMeshes()[0] + mesh_dim = mesh.getSpaceDimension() if mesh_dim >= 3: from sys import platform if platform in ["win32"]: diff --git a/src/MEDLoader/Swig/sauv2med b/src/MEDLoader/Swig/sauv2med index 2b0760e19..9673ff69c 100755 --- a/src/MEDLoader/Swig/sauv2med +++ b/src/MEDLoader/Swig/sauv2med @@ -23,6 +23,7 @@ from sys import argv,path from os.path import dirname,abspath,sep +from medutilities import sauv2med d = argv[0] d = dirname(d)