From: barate Date: Tue, 18 Dec 2012 16:12:35 +0000 (+0000) Subject: Fix Numpy version conflict when using custom Numpy with System Python and that anothe... X-Git-Tag: B4NGCMakeInt X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=af2b8adfcdf6d10d100cafa04f452a2d9e26155a;p=modules%2Fkernel.git Fix Numpy version conflict when using custom Numpy with System Python and that another Numpy is installed in the system --- diff --git a/salome_adm/cmake_files/FindPYTHON.cmake b/salome_adm/cmake_files/FindPYTHON.cmake index df658fba4..136332b0f 100644 --- a/salome_adm/cmake_files/FindPYTHON.cmake +++ b/salome_adm/cmake_files/FindPYTHON.cmake @@ -214,7 +214,7 @@ IF(PYTHON_STATUS) ENDIF(NUMPY_INCLUDE_DIR) IF(NUMPY_STATUS) SET(PYTHON_INCLUDES ${PYTHON_INCLUDES} -DWITH_NUMPY -I${NUMPY_INCLUDE_DIR})# to remove - SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}) + SET(PYTHON_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) SET(PYTHON_DEFINITIONS "${PYTHON_DEFINITIONS} -DWITH_NUMPY") MESSAGE(STATUS "numpy found : ${NUMPY_INCLUDE_DIR}") ELSE(NUMPY_STATUS) diff --git a/salome_adm/unix/config_files/check_swig.m4 b/salome_adm/unix/config_files/check_swig.m4 index 1109f9154..ccee20d06 100644 --- a/salome_adm/unix/config_files/check_swig.m4 +++ b/salome_adm/unix/config_files/check_swig.m4 @@ -61,7 +61,7 @@ fi numpydir=`$PYTHON -c "import numpy;print numpy.get_include()" 2>/dev/null` if test -d "$numpydir"; then numpy_ok=yes - PYTHON_INCLUDES="$PYTHON_INCLUDES -I$numpydir" + PYTHON_INCLUDES="-I$numpydir $PYTHON_INCLUDES" SWIG_FLAGS="$SWIG_FLAGS -DWITH_NUMPY=WITH_NUMPY " AC_DEFINE([WITH_NUMPY], [], [Python has numpy extension]) fi