mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
Correct a flaw in the Python 3 version checking
It turns out the ax_python_devel.m4 version check assumes that
("3.X+1.0" >= "3.X.0") is True in Python, which is not when X+1
is 10 or above and X is not. (Also presumably X+1=100 and ...)
So let's remake the check to behave consistently, using the
"packaging" or (if absent) the "distlib" modules.
(Also, update the Github workflows to use the new packages.)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes: #12073
This commit is contained in:
@@ -46,6 +46,21 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYZFS], [
|
||||
])
|
||||
AC_SUBST(DEFINE_PYZFS)
|
||||
|
||||
dnl #
|
||||
dnl # Python "packaging" (or, failing that, "distlib") module is required to build and install pyzfs
|
||||
dnl #
|
||||
AS_IF([test "x$enable_pyzfs" = xcheck -o "x$enable_pyzfs" = xyes], [
|
||||
ZFS_AC_PYTHON_MODULE([packaging], [], [
|
||||
ZFS_AC_PYTHON_MODULE([distlib], [], [
|
||||
AS_IF([test "x$enable_pyzfs" = xyes], [
|
||||
AC_MSG_ERROR("Python $PYTHON_VERSION packaging and distlib modules are not installed")
|
||||
], [test "x$enable_pyzfs" != xno], [
|
||||
enable_pyzfs=no
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Require python-devel libraries
|
||||
dnl #
|
||||
|
||||
Reference in New Issue
Block a user