diff options
author | Miro Hron\v{c}ok <miro@hroncok.cz> | 2020-10-27 14:33:46 -0700 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-27 14:33:46 -0700 |
commit | e21d46fddd0753e66a4acda88317670fee07f3e6 (patch) | |
tree | b9182fc9804eac7a89708defed3a5190cacb9667 /doc | |
parent | 310edf02fb3f6da76500c813900d4cea7d9f36d8 (diff) | |
download | automake-e21d46fddd0753e66a4acda88317670fee07f3e6.tar.gz |
python: determine Python (3.10) version number correctly.
This change fixes https://bugs.gnu.org/44239
(and https://bugzilla.redhat.com/show_bug.cgi?id=1889732).
* m4/python.m4: use print('%u.%u' % sys.version_info[:2]) for
the version number instead of merely sys.version[:3], so the
numbers are treated as numbers.
* t/python-vars.sh (PYTHON_VERSION): Likewise.
* doc/automake.texi: Document it.
* NEWS: mention it. (Minor tweaks from Karl Berry.)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/automake.texi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/automake.texi b/doc/automake.texi index ed7e2e242..17bc2dae6 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -7861,7 +7861,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) @item PYTHON_VERSION The Python version number, in the form @var{major}.@var{minor} (e.g., @samp{2.5}). This is currently the value of -@samp{sys.version[:3]}. +@samp{'%u.%u' % sys.version_info[:2]}. @item PYTHON_PREFIX The string @samp{$@{prefix@}}. This term may be used in future work |