I would normally use an f-string or str.format() but I wanted to keep
ancient Python version support. So I went with %-formatting. I've seen
%u somewhere in the codebase already instead of %d, so I've decided to
keep it consistent -- apparently I have failed and used %d in one of
the places anyway
The patch is
https://src.fedoraproject.org/fork/churchyard/rpms/automake/raw/f8af40fe1fa92a3ea0a1520a9d5f0797d0019f0f/f/automake-1.16.2-python-version-multiple-digits.patch
Thanks, I pushed it with some minor additional documentation updates.
python3.10 -c 'import sys; print("%u.%u" % sy
https://bugzilla.redhat.com/show_bug.cgi?id=1889732
Well, I found the updated patch from Miro at
https://src.fedoraproject.org/rpms/automake/pull-request/3.patch,
which also fixes m4/python.m4, the crucial change being:
+-[am_cv_python_version=`$PYTHON -c "import sys;
sys.stdout.write(sy
The patch is
https://src.fedoraproject.org/fork/churchyard/rpms/automake/raw/f8af40fe1fa92a3ea0a1520a9d5f0797d0019f0f/f/automake-1.16.2-python-version-multiple-digits.patch
It includes doc update and the command line is:
$ python3.10 -c 'import sys; print("%u.%u" % sys.version_info[:2])'
3.10
Hi,
we have encountered an issue[1] with the python double-digit version
detection.
The used `sys.version[:3]` used in automake strips digits from the python
version. For example '3.10' is detected as '3.1'.
To fix this issue, `sys.version[:3]` is changed to `sys.version_info[:2]`
in the attache