From 3a4c128626855d7ec0adf453c32a1c2ac35a6d00 Mon Sep 17 00:00:00 2001 From: Nicolas Geimer Date: Wed, 15 Mar 2017 15:39:59 +0100 Subject: [PATCH] [PY3] Swig additional fixes --- src/GEOM_SWIG/geomBuilder.py | 8 ++++---- src/GEOM_SWIG_WITHIHM/CMakeLists.txt | 2 +- src/XAO_Swig/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index e5312d23c..b367b5873 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -554,7 +554,7 @@ engine = None doLcc = False created = False -class geomBuilder(object, GEOM._objref_GEOM_Gen): +class geomBuilder(GEOM._objref_GEOM_Gen): ## Enumeration ShapeType as a dictionary. \n ## Topological types of shapes (like Open Cascade types). See GEOM::shape_type for details. @@ -605,7 +605,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): # @ingroup l1_geomBuilder_auxiliary kind = GEOM.GEOM_IKindOfShape - def __new__(cls): + def __new__(cls, *args): global engine global geom global doLcc @@ -644,12 +644,12 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): #print "return geom 2 ", geom return geom - def __init__(self): + def __init__(self, *args): global created #print "-------- geomBuilder __init__ --- ", created, self if not created: created = True - GEOM._objref_GEOM_Gen.__init__(self) + GEOM._objref_GEOM_Gen.__init__(self, *args) self.myMaxNbSubShapesAllowed = 0 # auto-publishing is disabled by default self.myBuilder = None self.myStudyId = 0 diff --git a/src/GEOM_SWIG_WITHIHM/CMakeLists.txt b/src/GEOM_SWIG_WITHIHM/CMakeLists.txt index aac28d6d3..e513c0bca 100755 --- a/src/GEOM_SWIG_WITHIHM/CMakeLists.txt +++ b/src/GEOM_SWIG_WITHIHM/CMakeLists.txt @@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES( # swig flags SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(libGEOM_Swig.i PROPERTIES SWIG_FLAGS "-py3") SET_SOURCE_FILES_PROPERTIES(libGEOM_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") # additional preprocessor / compiler flags diff --git a/src/XAO_Swig/CMakeLists.txt b/src/XAO_Swig/CMakeLists.txt index fa47112e0..92b8da83d 100644 --- a/src/XAO_Swig/CMakeLists.txt +++ b/src/XAO_Swig/CMakeLists.txt @@ -52,7 +52,7 @@ SET(_swig_SCRIPTS # swig flags SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_FLAGS "-py3") #SET_SOURCE_FILES_PROPERTIES(xao_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") # --- rules --- -- 2.39.2