[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool: Use the Python implementation by default
From: |
Pádraig Brady |
Subject: |
Re: gnulib-tool: Use the Python implementation by default |
Date: |
Sat, 27 Apr 2024 13:17:33 +0100 |
User-agent: |
Mozilla Thunderbird |
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
- gnulib-tool: Use the Python implementation by default, Bruno Haible, 2024/04/26
- Re: gnulib-tool: Use the Python implementation by default, Collin Funk, 2024/04/26
- Re: gnulib-tool: Use the Python implementation by default,
Pádraig Brady <=
- Re: gnulib-tool: Use the Python implementation by default, Bruno Haible, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default, Paul Eggert, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default, Bruno Haible, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default, Collin Funk, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default, Paul Eggert, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default, Dmitry Selyutin, 2024/04/29
- Re: gnulib-tool: Use the Python implementation by default, Bruno Haible, 2024/04/29
- Re: gnulib-tool: Use the Python implementation by default, Collin Funk, 2024/04/29