On Wed, Jul 14, 2021 at 11:49:23AM +0200, David Sommerseth wrote:
> 
> Hi,
> 
> So I'm running some builds for the openvpn3-linux project on Fedora
> Rawhide ...  And we have this little line in configure.ac:
> 
>     AM_PATH_PYTHON([3.5],, [:])
> 
> When ./configure runs, it reports:
> 
>     checking for python3 version... 3.1
> 
> As a colleague said, mathematically this is correct.  But that
> doesn't really help.  Who/what is truncating Python 3.10 to 3.1?
> And how can that be fixed?  Is someone already looking into this?

It's a bug in AM_PATH_PYTHON (defined in
/usr/share/aclocal-1.16/python.m4).

  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
    [am_cv_python_version=`$PYTHON -c "import sys; 
sys.stdout.write(sys.version[[:3]])"`])

In the Python 3.10 interpreter:

>>> print(sys.version[:3])
3.1

(because the first 3 characters of the string "3.10.0b2" are "3.1")

This seems to have been fixed upstream already:

https://git.savannah.gnu.org/cgit/automake.git/tree/m4/python.m4#n89
https://git.savannah.gnu.org/cgit/automake.git/commit/m4/python.m4?id=e21d46fddd0753e66a4acda88317670fee07f3e6

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to