Files
Christoph Reiter 8402a08a98 python: add a setuptools-rust test
mainly tests that our Python works with PyO3
2025-12-31 10:23:34 +01:00

16 lines
349 B
Bash

#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
echo "skipped on $MSYSTEM"
exit 0;
fi
# should be fixed in the next pyo3 version (0.28)
link_arg=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBPYTHON'))")
export RUSTFLAGS="-C link-arg=$link_arg"
./setup.py build_rust --inplace
python -m setuptools_rust_test