[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib-tool: Use the Python implementation by default
From: |
Bruno Haible |
Subject: |
Re: gnulib-tool: Use the Python implementation by default |
Date: |
Sat, 27 Apr 2024 15:32:45 +0200 |
Hi Pádraig,
> > + 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,
I wanted a short warning message. In most cases the absence of python3
will be the problem. It should be rare than anyone still uses an old
version.
> and replace the above 6 lines with:
>
> if python3 -c 'import sys; sys.exit(not sys.version_info >= (3,7))'
> 2>/dev/null; then
Thanks for the hint. I admit that I did not think at it. But is it
actually better?
Are there alternative Python implementations, which could be installed under
the name 'python3'?
Note also that your snippet would not replace the 6 lines of code, only the
last 5 lines, because with Solaris 10 /bin/sh your snippet produces the
diagnostic
python3: not found
Bruno
- 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, 2024/04/27
- Re: gnulib-tool: Use the Python implementation by default,
Bruno Haible <=
- 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