Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if test "$_python_static" != no || test "$_python_modular" != no
- then
- echocheck "Python numpy support"
- if $PYTHON -c "import sys; import numpy" >/dev/null 2>&1
- then
- if [ `$PYTHON -c 'import numpy; print numpy.__version__' | cut -c 1` -gt 0 ]
- then
- echores "`$PYTHON -c 'import numpy; print numpy.__version__'`"
- else
- echores "`$PYTHON -c 'import numpy; print numpy.__version__'`... too old version 1.0 or later required"
- if test "$_python" = yes
- then
- die "python numpy outdated"
- fi
- _python="no"
- fi
- else
- echores "no"
- if test "$_python" = yes || test "$_python_static" = yes \
- || test "$_python_modular" = yes
- then
- die "python numpy package missing"
- fi
- _python="no"
- fi
- if test "$_python" != no
- then
- PRE_LIB_SWIG_PYTHON_MODULAR=_
- EXT_IF_SWIG_PYTHON_MODULAR='.py'
- test -n "$_pyinclude" && _pyinclude="-I$_pyinclude"
- test -n "$_pyinclude" || _pyinclude=`$PYTHON -c "from distutils.sysconfig import get_python_inc; import numpy; print '-I%s -I%s' % (get_python_inc(), numpy.get_include())"`
- _pylibpath=`$PYTHON -c 'from distutils.sysconfig import get_config_vars; print "-L%(LIBPL)s" % get_config_vars()'`
- EXT_LIB_SWIG_PYTHON_MODULAR=`$PYTHON -c 'from distutils.sysconfig import get_config_vars; print "%(SO)s" % get_config_vars()'`
- test -n "$_pylibs" || _pylibs=`$PYTHON -c "import sys; print 'python'+sys.version[0:3]"`${EXT_LIB_SWIG_PYTHON_MODULAR%.*}
- INCLUDES_PYTHON="$_pyinclude $INCLUDES_PYTHON"
- COMPFLAGS_CPP_PYTHON="-fno-strict-aliasing -fPIC $COMPFLAGS_CPP_PYTHON"
- COMPFLAGS_C_PYTHON="-fno-strict-aliasing -fPIC $COMPFLAGS_C_PYTHON"
- if darwin
- then
- LINKFLAGS_PYTHON="$_pylibpath -l$_pylibs -ldl -bundle -Wl,-flat_namespace $LINKFLAGS_PYTHON"
- POSTLINKFLAGS_PYTHON="$_pylibpath -l$_pylibs -ldl -bundle -Wl,-flat_namespace $POSTLINKFLAGS_PYTHON"
- else
- LINKFLAGS_PYTHON="-shared $_pylibpath -l$_pylibs $LINKFLAGS_PYTHON"
- POSTLINKFLAGS_PYTHON="-shared $_pylibpath -l$_pylibs $POSTLINKFLAGS_PYTHON"
- fi
- PYTHON_TARGET="sg$EXT_LIB_SWIG_PYTHON_MODULAR"
Advertisement
Add Comment
Please, Sign In to add comment