#!/bin/bash
echo This script runs some tests and then builds the python module.
set -ev
cargo test
wasm-pack build --target web
rm -rf target/wheels
maturin build -b cffi --release --strip
rm -rf python-module
python3 -m wheel unpack --dest python-module target/wheels/latex_snippet-*.whl
mv -v python-module/*/latex_snippet python-module/