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