<commit_before># Stop on error
set -e

# Build SciPy - use a prefix, without it is broken
meson setup build --prefix=/home/rgommers/code/bldscipy/installdir
ninja -C build
pushd build
meson install
popd
# Avoid being in a directory which has a scipy/ dir
pushd installdir

export PYTHONPATH=~/code/bldscipy/installdir/lib/python3.9/site-packages/
# python -c "from scipy import linalg as s; s.test()"  # relies on sparse
python -c "from scipy import constants as s; s.test()"
# python -c "from scipy import ndimage as s; s.test()"  # relies on special
python -c "from scipy import odr as s; s.test()"
python -c "from scipy.sparse import csgraph as s; s.test()"
# python -c "from scipy import sparse as s; s.test()"  # relies on sparse.linalg
# python -c "from scipy import fftpack as s; s.test()"  # relies on fft
# python -c "from scipy import fft as s; s.test()"  # relies on special
# python -c "from scipy import _lib as s; s.test()"  # relies on spatial
popd

# Notes:
#
# In case of an issue with build options, use the introspect command:
#   meson introspect build/ -i --targets<commit_msg>mesondev.sh accepts build and install paths (#24)<commit_after># Stop on error
set -e

# Command Line Arguments
# $1 - First argument is an absolute/relative 
#      path to build directory.
# $2 - Second argument is an absolute path to
#      install directory.

# TODO: Default $1 and $2 arguments to standard paths
# once migration to meson build system is complete.

# Build SciPy - use a prefix, without it is broken
meson setup $1 --prefix=$2
ninja -C $1
pushd $1
meson install
popd
# Avoid being in a directory which has a scipy/ dir
pushd $2

export PYTHONPATH=$2/lib/python3.9/site-packages/
# python -c "from scipy import linalg as s; s.test()"  # relies on sparse
python -c "from scipy import constants as s; s.test()"
# python -c "from scipy import ndimage as s; s.test()"  # relies on special
python -c "from scipy import odr as s; s.test()"
python -c "from scipy.sparse import csgraph as s; s.test()"
# python -c "from scipy import sparse as s; s.test()"  # relies on sparse.linalg
# python -c "from scipy import fftpack as s; s.test()"  # relies on fft
# python -c "from scipy import fft as s; s.test()"  # relies on special
# python -c "from scipy import _lib as s; s.test()"  # relies on spatial
# python -c "from scipy import optimize as s; s.test()" # relies on sparse.linalg
popd

# Notes:
#
# In case of an issue with build options, use the introspect command:
#   meson introspect build/ -i --targets
{'fraction_non_alphanumeric': 0.10515873015873016, 'fraction_numerical': 0.006349206349206349, 'mean_word_length': 3.591985428051002, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2036185', 'n_tokens_mistral': 907, 'n_tokens_neox': 860, 'n_words': 375}