#!/bin/sh
# SUSE 15 can keep an old /usr/bin/python3 alongside versioned Python >= 3.10.
# Restrict this wrapper to RustProxy's service PATH; never replace system Python.
for executable in /usr/bin/python3.14 /usr/bin/python3.13 /usr/bin/python3.12 /usr/bin/python3.11 /usr/bin/python3.10 /usr/bin/python3; do
    if [ -x "$executable" ] && "$executable" -c 'import sys; sys.exit(sys.version_info < (3, 10))' >/dev/null 2>&1; then
        exec "$executable" "$@"
    fi
done
echo 'RustProxy requires Python 3.10 or newer; install a supported python3XX package.' >&2
exit 127
