From af2b8adfcdf6d10d100cafa04f452a2d9e26155a Mon Sep 17 00:00:00 2001 From: barate Date: Tue, 18 Dec 2012 16:12:35 +0000 Subject: [PATCH] Fix Numpy version conflict when using custom Numpy with System Python and that another Numpy is installed in the system --- salome_adm/cmake_files/FindPYTHON.cmake | 2 +- salome_adm/unix/config_files/check_swig.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2