Ignore error messages (liblapack missing symbols) on stderr from

'python3 -c "import numpy"' for now, fixes numpy detection (and the
build)
This commit is contained in:
landry 2019-04-27 10:56:49 +00:00
parent fba5fa4f2b
commit d55de8a3b0

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-cmake_modules_FindNumPy_cmake,v 1.1 2019/04/27 10:56:49 landry Exp $
horrible hack to ignore error message from broken lapack 3.8
Index: cmake/modules/FindNumPy.cmake
--- cmake/modules/FindNumPy.cmake.orig
+++ cmake/modules/FindNumPy.cmake
@@ -20,11 +20,9 @@ endif()
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import numpy; print (numpy.get_include()); print (numpy.version.version)"
OUTPUT_VARIABLE NUMPY_OUTPUT
ERROR_VARIABLE NUMPY_ERROR)
-if (NOT NUMPY_ERROR)
- STRING(REPLACE "\n" ";" NUMPY_OUTPUT ${NUMPY_OUTPUT})
- LIST(GET NUMPY_OUTPUT 0 PYTHON_NUMPY_INCLUDE_DIRS)
- LIST(GET NUMPY_OUTPUT 1 PYTHON_NUMPY_VERSION)
-endif(NOT NUMPY_ERROR)
+STRING(REPLACE "\n" ";" NUMPY_OUTPUT ${NUMPY_OUTPUT})
+LIST(GET NUMPY_OUTPUT 0 PYTHON_NUMPY_INCLUDE_DIRS)
+LIST(GET NUMPY_OUTPUT 1 PYTHON_NUMPY_VERSION)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(NumPy DEFAULT_MSG PYTHON_NUMPY_VERSION PYTHON_NUMPY_INCLUDE_DIRS)