diff --git a/common.mk b/common.mk index d390366d..147f277d 100644 --- a/common.mk +++ b/common.mk @@ -506,14 +506,14 @@ ifeq ($(DO_CHECKS), 1) # NUMPY is available -> next step should not fail # That's why we are not checking if the NUMPY_INCL_FLAG is defined. ifeq ($(NUMPY_CHECKED), 0) - export NUMPY_INCL_FLAG := $(shell $(PYTHON) -c "from __future__ import print_function; import numpy; print('-isystem ' + numpy.__path__[0] + '/core/include/numpy/')") + export NUMPY_INCL_FLAG := $(shell $(PYTHON) -c "from __future__ import print_function; import numpy; print('-isystem ' + numpy.get_include())") # Take the second word -> the path (the first word is "isystem") NUMPY_INCL_PATH := $(word 2, ${NUMPY_INCL_FLAG}) # Now check that the 'arrayobject.h' file is present in the # supposed numpy directory. Otherwise, compilation will fail. # The absence of the file likely indicates a missing numpy-devel # package (see issue #134 on github) - NUMPY_NEEDED_HEADER_FILE := ${NUMPY_INCL_PATH}arrayobject.h + NUMPY_NEEDED_HEADER_FILE := ${NUMPY_INCL_PATH}/numpy/arrayobject.h ifeq (,$(wildcard ${NUMPY_NEEDED_HEADER_FILE})) $(error Required $(ccred)numpy headers$(ccreset) are missing...stopping the compilation. You might be able to fix this by installing $(ccblue)numpy-devel$(ccreset)) endif diff --git a/mocks/python_bindings/_countpairs_mocks.c b/mocks/python_bindings/_countpairs_mocks.c index cbe41afa..e4f386a9 100644 --- a/mocks/python_bindings/_countpairs_mocks.c +++ b/mocks/python_bindings/_countpairs_mocks.c @@ -10,7 +10,7 @@ #include /* Now, include the numpy header*/ -#include +#include //for correlation functions #include "countpairs_rp_pi_mocks.h" diff --git a/theory/python_bindings/_countpairs.c b/theory/python_bindings/_countpairs.c index 8bc3c93c..9f52ca3e 100644 --- a/theory/python_bindings/_countpairs.c +++ b/theory/python_bindings/_countpairs.c @@ -15,7 +15,7 @@ #include /* Now, include the numpy header*/ -#include +#include //for correlation functions #include "countpairs.h"