From 42c70284400c5b73aca9b9b8ffd91a035da25bf8 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Wed, 10 May 2017 08:13:13 +0200 Subject: [PATCH] Swig flag for python 3 + various fixes --- src/SMESH_SWIG/batchmode_smesh.py | 4 ++-- src/SMESH_SWIG/ex30_tepal.py | 1 - src/SMESH_SWIG_WITHIHM/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/SMESH_SWIG/batchmode_smesh.py b/src/SMESH_SWIG/batchmode_smesh.py index 28a25a251..6815bbbe0 100644 --- a/src/SMESH_SWIG/batchmode_smesh.py +++ b/src/SMESH_SWIG/batchmode_smesh.py @@ -145,7 +145,7 @@ def AddNewAlgorithms(IOR): res, AlgorithmsRoot = mySComponentMesh.FindSubObject (Tag_AlgorithmsRoot) if AlgorithmsRoot is None or res == 0: - AlgorithmsRoot = myStudyBuilde.NewObjectToTag (mySComponentMesh, Tag_AlgorithmsRoot) + AlgorithmsRoot = myStudyBuilder.NewObjectToTag (mySComponentMesh, Tag_AlgorithmsRoot) aName = myStudyBuilder.FindOrCreateAttribute(AlgorithmsRoot, "AttributeName") aName.SetValue("Algorithms") aSelAttr = myStudyBuilder.FindOrCreateAttribute(AlgorithmsRoot, "AttributeSelectable") @@ -156,7 +156,7 @@ def AddNewAlgorithms(IOR): # Add New Algorithms newHypo = myStudyBuilder.NewObject(AlgorithmsRoot) aPixmap = myStudyBuilder.FindOrCreateAttribute(newHypo, "AttributePixMap") - aPixmap = anAttr._narrow(SALOMEDS.AttributePixMap) + aPixmap = aPixmap._narrow(SALOMEDS.AttributePixMap) H = orb.string_to_object(IOR) aType = H.GetName(); #QString in fact aPixmap.SetPixMap( "mesh_tree_algo.png_" + aType ) diff --git a/src/SMESH_SWIG/ex30_tepal.py b/src/SMESH_SWIG/ex30_tepal.py index 699df1640..0c75c3794 100644 --- a/src/SMESH_SWIG/ex30_tepal.py +++ b/src/SMESH_SWIG/ex30_tepal.py @@ -76,7 +76,6 @@ algo3d.SetMEDName(results) algo3d.SetNbPart(4) algo3d.SetBackground(False) algo3d.SetKeepFiles(False) -algo3d.SetToMeshHoles(True) # Launch meshers # -------------- diff --git a/src/SMESH_SWIG_WITHIHM/CMakeLists.txt b/src/SMESH_SWIG_WITHIHM/CMakeLists.txt index 4132fa9a3..82e130067 100644 --- a/src/SMESH_SWIG_WITHIHM/CMakeLists.txt +++ b/src/SMESH_SWIG_WITHIHM/CMakeLists.txt @@ -84,7 +84,7 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_direct # swig flags SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_FLAGS "-py3") SET_SOURCE_FILES_PROPERTIES(libSMESH_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") # --- scripts --- -- 2.39.2