# -*- shell-script -*-
cd src

set -e

# https://github.com/scipy/scipy/issues/16536 - meson breaks when CXX="g++ -std=gnu++11"
# -- this also affects numpy
export CXX=$(echo "$CXX" | sed 's/-std=[a-z0-9+]*//g')

if [ "$SAGE_FAT_BINARY" = "yes" ]; then
    export NUMPY_FCONFIG="--cpu-baseline=NONE"
else
    export NUMPY_FCONFIG=""
fi

### Per https://github.com/numpy/numpy/releases/tag/v1.26.0b1
### "NumPy-specific build customization":
###
### The NPY_* environment variables which control BLAS/LAPACK, SIMD,
### threading, and other such options are no longer supported, nor is
### a site.cfg file to select BLAS and LAPACK. Instead, there are
### command-line flags that can be passed to the build via pip/build's
### config-settings interface.  These flags are all listed in
### https://github.com/numpy/numpy/blob/main/meson_options.txt
###
### 1.26.0b1 temporarily vendors Meson and meson-python
### http://scipy.github.io/devdocs/building/index.html


sdh_pip_install .
