From: vsr Date: Thu, 14 Oct 2021 11:48:44 +0000 (+0300) Subject: bos #26520 Remove dependency on boost::python X-Git-Tag: V9_8_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9ed042e4aeec30e21813978a2dd0c3e70e8993ef;p=modules%2Fkernel.git bos #26520 Remove dependency on boost::python --- diff --git a/src/Container/CMakeLists.txt b/src/Container/CMakeLists.txt index a289e76cd..77bf4488c 100644 --- a/src/Container/CMakeLists.txt +++ b/src/Container/CMakeLists.txt @@ -22,7 +22,6 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/salome_adm ${CMAKE_CURRENT_SOURCE_DIR}/../Basics ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace @@ -45,7 +44,7 @@ SET(SCRIPTS SALOME_ContainerPy.py ) -ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}) +ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${OMNIORB_DEFINITIONS}) SET(COMMON_LIBS Registry SalomeNotification @@ -60,7 +59,6 @@ SET(COMMON_LIBS SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PYTHON_LIBRARIES} - ${Boost_PYTHON3_LIBRARY} ) IF(WITH_MPI_SEQ_CONTAINER) diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index b196bfac0..e7674b57e 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -64,7 +64,9 @@ int SIGUSR1 = 1000; #include #include "Container_init_python.hxx" +#ifdef BOS26455_WITH_BOOST_PYTHON #include +#endif bool _Sleeping = false ; @@ -375,6 +377,7 @@ namespace { std::string error; if (PyErr_Occurred()) { +#ifdef BOS26455_WITH_BOOST_PYTHON PyObject *ptype = nullptr; PyObject *pvalue = nullptr; PyObject *ptraceback = nullptr; @@ -391,6 +394,9 @@ namespace { boost::python::object format_exc = traceback.attr("format_exception"); boost::python::object formatted = format_exc(htype, hvalue, htraceback); error = boost::python::extract(boost::python::str("\n").join(formatted)); +#else + error = "Python exception is caught"; +#endif } return error; }