# HG changeset patch # User Mike Miller # Date 1493855880 25200 # Node ID 4f415a887ff88f09bb32666276f8d44034221519 # Parent db29823a8919cb9c905ce68c0734251964da1be7 build: drop build-time dependency on NumPy * Makefile.am (AM_CPPFLAGS): Remove -I$(NUMPY_INCLUDEDIR). * bitbucket-pipelines.yml: Don't install python-numpy or python3-numpy. * configure.ac: Remove call to AX_PYTHON_NUMPY. * m4/ax_python_numpy.m4: Delete. diff -r db29823a8919 -r 4f415a887ff8 Makefile.am --- a/Makefile.am Wed May 03 16:37:51 2017 -0700 +++ b/Makefile.am Wed May 03 16:58:00 2017 -0700 @@ -22,7 +22,7 @@ ACLOCAL_AMFLAGS = -I m4 -AM_CPPFLAGS = $(OCTAVE_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(NUMPY_INCLUDEDIR) +AM_CPPFLAGS = $(OCTAVE_CPPFLAGS) $(PYTHON_CPPFLAGS) INCFLAGS = $(DEFAULT_INCLUDES) export INCFLAGS diff -r db29823a8919 -r 4f415a887ff8 bitbucket-pipelines.yml --- a/bitbucket-pipelines.yml Wed May 03 16:37:51 2017 -0700 +++ b/bitbucket-pipelines.yml Wed May 03 16:58:00 2017 -0700 @@ -6,7 +6,7 @@ script: - apt-get update - apt-get install -y python-dev python3-dev - - apt-get install -y libboost-python-dev python-numpy python3-numpy + - apt-get install -y libboost-python-dev - autoreconf -i - mkdir -p py2 py3 - ( cd py2 && ../configure PYTHON_VERSION=2 ) diff -r db29823a8919 -r 4f415a887ff8 configure.ac --- a/configure.ac Wed May 03 16:37:51 2017 -0700 +++ b/configure.ac Wed May 03 16:58:00 2017 -0700 @@ -45,9 +45,6 @@ # Pick a Python library to use AX_PYTHON_DEVEL -# Look for numpy headers -AX_PYTHON_NUMPY([], [AC_MSG_FAILURE([unable to find NumPy development files])]) - # Look for boost::python AX_BOOST_PYTHON if test -z "$BOOST_PYTHON_LIB"; then diff -r db29823a8919 -r 4f415a887ff8 m4/ax_python_numpy.m4 --- a/m4/ax_python_numpy.m4 Wed May 03 16:37:51 2017 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -# =========================================================================== -# -# =========================================================================== -# -# SYNOPSIS -# -# AX_PYTHON_NUMPY([ACTION_IF_FOUND], [ACTION_IF_NOT_FOUND]) -# -# COPYING -# -# Copyright (c) 2009 David Grundberg -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([AX_PYTHON_NUMPY],[ - NUMPY_INCLUDEDIR= - - AC_MSG_CHECKING([for python]) - AS_IF([test -z "$PYTHON"], [ - AC_MSG_RESULT([unknown]) - ],[ - AC_MSG_RESULT([$PYTHON]) - ]) - - AC_MSG_CHECKING([for numpy includedir]) - AS_IF([test -z "$PYTHON"], [ - AC_MSG_RESULT([no (python unknown)]) - ],[ - NUMPY_INCLUDEDIR=`$PYTHON -c ' -try: - from numpy import get_include - print(get_include()) -except: - pass -'` - AC_MSG_RESULT([$NUMPY_INCLUDEDIR]) - ]) - - AS_IF([test -n "$NUMPY_INCLUDEDIR"], [ - - AC_CACHE_CHECK([whether linking to numpy library works], [ax_python_numpy_cv_check], - [ - ax_python_numpy_cv_check=no - - AC_LANG_PUSH([C++]) - - ax_python_numpy_cppflags="$CPPFLAGS" - ax_python_numpy_ldflags="$LDFLAGS" - CPPFLAGS="$CPPFLAGS -I$NUMPY_INCLUDEDIR $PYTHON_CPPFLAGS" - LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS $PYTHON_LIBS" - - AC_LANG_ASSERT(C++) - AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[ -#define PY_ARRAY_UNIQUE_SYMBOL my_array_symbol -#include -#include -#include -]], - [[ &PyArray_FromDims; ]])], - [ax_python_numpy_cv_check=yes], - [ax_python_numpy_cv_check=no]) - CPPFLAGS="$ax_python_numpy_cppflags" - LDFLAGS="$ax_python_numpy_ldflags" - - AC_LANG_POP([C++]) - ]) - ]) - - AS_IF([test "x$ax_python_numpy_cv_check" != "xyes"], [ - NUMPY_INCLUDEDIR= - - AC_MSG_WARN([[ -======================================================================== -Can not link with Numpy. - -Make sure the Numpy development package is installed. -========================================================================]]) - ]) - - AC_SUBST([NUMPY_INCLUDEDIR]) - - # Execute ACTION_IF_FOUND or ACTION_IF_NOT_FOUND - if test "x$ax_python_numpy_cv_check" == "xyes" ; then - m4_ifvaln([$1],[$1],[:])dnl - m4_ifvaln([$2],[else $2])dnl - fi - -])