mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Correct a flaw in the Python 3 version checking (#12636)
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:
@@ -311,6 +311,11 @@ Requires: libffi
|
||||
Requires: python%{__python_pkg_version}
|
||||
Requires: %{__python_cffi_pkg}
|
||||
%if 0%{?rhel}%{?fedora}%{?suse_version}
|
||||
%if 0%{?rhel} >= 8 || 0%{?centos} >= 8 || 0%{?fedora} >= 28
|
||||
BuildRequires: python3-packaging
|
||||
%else
|
||||
BuildRequires: python-packaging
|
||||
%endif
|
||||
BuildRequires: python%{__python_pkg_version}-devel
|
||||
BuildRequires: %{__python_cffi_pkg}
|
||||
BuildRequires: %{__python_setuptools_pkg}
|
||||
|
||||
Reference in New Issue
Block a user