Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
86677466
Commit
86677466
authored
Dec 08, 2014
by
Tiago Peixoto
Browse files
Fix automatic detection of numpy C API include path
parent
50cbd928
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
86677466
...
...
@@ -254,12 +254,11 @@ dnl Checks for header files.
dnl numpy
AX_PYTHON_MODULE(numpy, fatal)
dnl [NUMPY_DIR="${PYTHON_SITE_PKG}/numpy"]
[NUMPY_DIR=`$PYTHON -c "import
os,
numpy; print(
os.path.dirname(numpy.__file__
))"`]
[NUMPY_DIR=`$PYTHON -c "import numpy; print(
numpy.get_include(
))"`]
AC_ARG_WITH([numpy], [AS_HELP_STRING([--with-numpy=DIR],[directory where numpy is installed
[default=auto-detected] ])],
NUMPY_DIR=$withval)
[NUMPY_DIR="${NUMPY_DIR}/core/include/numpy"]
AC_CHECK_HEADER([${NUMPY_DIR}/arrayobject.h],
NUMPY_DIR=$withval)
AC_CHECK_HEADER([${NUMPY_DIR}/numpy/arrayobject.h],
[CPPFLAGS="${CPPFLAGS} -I${NUMPY_DIR}"],
[AC_MSG_ERROR([Numpy extension header not found])],
[#include "Python.h"])
...
...
src/graph/numpy_bind.hh
View file @
86677466
...
...
@@ -27,7 +27,7 @@
#define NO_IMPORT_ARRAY
#endif
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include "arrayobject.h"
#include "
numpy/
arrayobject.h"
#if NPY_API_VERSION < 0x00000007
#include "numpy_bind_old.hh"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment