]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
[PY3] Update with MEDCoupling
authorGilles DAVID <gilles-g.david@edf.fr>
Thu, 20 Apr 2017 08:17:35 +0000 (10:17 +0200)
committerGilles DAVID <gilles-g.david@edf.fr>
Thu, 20 Apr 2017 08:17:35 +0000 (10:17 +0200)
src/MEDCalculator/Swig/CMakeLists.txt
src/MEDCalculator/Swig/MEDCalculator.i
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/Client/CMakeLists.txt

index 0ce37e87e1a2e9588b33ad4190e028eceea779f1..8833bb745ce0cde247c6353f010673f943fa4792 100644 (file)
@@ -19,6 +19,9 @@
 # Author : Anthony Geay (CEA/DEN)
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
+IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+  ADD_DEFINITIONS(-DUSE_PYTHON3)
+ENDIF()
 
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
@@ -43,7 +46,7 @@ TARGET_LINK_LIBRARIES(medcalculatorspython ${MEDCoupling_interpkernel} ${PYTHON_
 INSTALL(TARGETS medcalculatorspython DESTINATION ${SALOME_INSTALL_LIBS})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_FLAGS "-py3")
 SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
 SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
 SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
index 2a75aff0c7729ec40033a67e62deb8c6292b069a..c0aa77c0c5ff417560bcdcdafd54fff26643ab9a 100644 (file)
@@ -439,6 +439,7 @@ def ParaMEDMEMMEDFileUMeshnew(cls,*args):
 %include "MEDCouplingFinalize.i"
 
 %pythoncode %{
+MEDCalculatorDBFieldReal.__rtruediv__ = MEDCalculatorDBFieldReal.__rdiv__
 MEDFileUMesh.__new__=classmethod(ParaMEDMEMMEDFileUMeshnew)
 del ParaMEDMEMMEDFileUMeshnew
 %}
index 651b535cb952fe870ef219a6d1193753f647f099..8d9c2ae3401f5323fa718e51404a7a7402a7d400 100644 (file)
 ADD_SUBDIRECTORY(Client)
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
+IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+  ADD_DEFINITIONS(-DUSE_PYTHON3)
+ENDIF()
 
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_FLAGS "-py3")
 SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
 
 SET(MEDCouplingCorba_SWIG_DPYS_FILES
index cc08d6198dee91314c5ac7ee3fd21e9c0149fc55..fd974c1575218236463d3f8cc33448427f6745be 100644 (file)
 # Author : Anthony Geay (CEA/DEN)
 
 ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
+IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
+  ADD_DEFINITIONS(-DUSE_PYTHON3)
+ENDIF()
 
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_FLAGS "-py3")
 SET(SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS "${NUMPY_DEFINITIONS};${SCIPY_DEFINITIONS}")
 
 INCLUDE_DIRECTORIES(