Parcourir la source

Merge branch 'FindPython-NumPy-fix-include-dir' into release-3.14

Merge-request: !3053
Brad King il y a 6 ans
Parent
commit
5c0ef417b8
2 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 1 2
      Modules/FindPython/Support.cmake
  2. 1 1
      Tests/FindPython/NumPy/arraytest.c

+ 1 - 2
Modules/FindPython/Support.cmake

@@ -1140,9 +1140,8 @@ if ("NumPy" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS AND ${_PYTHON_PREFIX}_Inte
       OUTPUT_STRIP_TRAILING_WHITESPACE)
   if (NOT _${_PYTHON_PREFIX}_RESULT)
     find_path(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR
-              NAMES arrayobject.h numpyconfig.h
+              NAMES "numpy/arrayobject.h" "numpy/numpyconfig.h"
               HINTS "${_${_PYTHON_PREFIX}_NumPy_PATH}"
-              PATH_SUFFIXES numpy
               NO_DEFAULT_PATH)
   endif()
   if(${_PYTHON_PREFIX}_NumPy_INCLUDE_DIR)

+ 1 - 1
Tests/FindPython/NumPy/arraytest.c

@@ -1,7 +1,7 @@
 #include "Python.h"
 
 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
-#include "arrayobject.h"
+#include "numpy/arrayobject.h"
 
 #include <math.h>