#!/usr/bin/env bash # SPDX-License-Identifier: GPL-3.0-or-later # blastem-events has nothing to build: run.py is Python 3.11+ with the standard library # only. This checks the interpreter and runs the smoke test, so every tool here has the # same one command. # ./build.sh check Python and run tests/smoke.py # ./build.sh --version print the tool and its version set -euo pipefail HERE=$(cd "$(dirname "$0")" && pwd) PYTHON=${PYTHON:-python3} case "${1:-}" in "") ;; --version) exec "$PYTHON" -I "$HERE/run.py" --version ;; *) echo "usage: build.sh [--version]" >&2; exit 2 ;; esac "$PYTHON" -I -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 3)' \ || { echo "blastem-events needs Python 3.11 or newer ($PYTHON)" >&2; exit 3; } "$PYTHON" -I "$HERE/tests/smoke.py"