On 26/04/2024 10:48, Bruno Haible wrote:
I committed this patch, which activates the Python rewrite of gnulib-tool for all users who have Python installed, without the need to set any environment variable. I'll make announcements to info-gnu and planet.gnu.org soon.
+ if (python3 --version) >/dev/null 2>/dev/null \ + && case `python3 --version 2>&1` in + Python\ 3.[0-6] | Python\ 3.[0-6].*) false ;; + Python\ 3.*) true ;; + *) false ;; + esac; then
It may be preferable to state the supported version directly, and replace the above 6 lines with: if python3 -c 'import sys; sys.exit(not sys.version_info >= (3,7))' 2>/dev/null; then
+ exec "$gnulib_dir/gnulib-tool.py" "$@" + else + echo "gnulib-tool: warning: python3 not found or too old, using the slow shell-based implementation" 1>&2 + exec "$gnulib_dir/gnulib-tool.sh" "$@" + fi + ;;
I've updated to the latest gnulib now in coreutils, and the auto python selection works well. thanks! Pádraig