Files
photoanalyzer/scripts/python

19 lines
532 B
Bash
Executable File

#!/bin/sh
set -eu
if command -v conda >/dev/null 2>&1; then
conda_version=$(conda run -n base python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")' 2>/dev/null || true)
case "$conda_version" in
3.1[2-9]|3.[2-9][0-9]) exec conda run --no-capture-output -n base python "$@" ;;
esac
fi
for python in python3.13 python3.12; do
if command -v "$python" >/dev/null 2>&1; then
exec "$python" "$@"
fi
done
echo "photoanalyzer: Python 3.12 or newer is required" >&2
exit 2