2.10.0 release tarball fails to configure with Python 3.10
Building 2.10.0 release tarball with:
./configure --prefix=/usr \
--disable-static \
--with-history \
--with-python=/usr/bin/python3 \
--docdir=/usr/share/doc/libxml2-2.10.0 \
--with-icu
results:
checking for python version... 3.1
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.10/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.10/site-packages
checking for PYTHON... no
configure: error: Package requirements (python-3.1) were not met:
No package 'python-3.1' found
It's because the configure script contains some code not adapted for Python 3.10:
am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
Running autoreconf
to regenerate the configure script fixes the issue on my local system. I guess we should just switch to a newer autoconf when we generate the tarball.