diff options
author | Rich Ercolani <[email protected]> | 2021-06-08 20:20:16 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-08 18:20:16 -0600 |
commit | 08cd0717359b1a18693e3c8e6d6e5a2819b35a48 (patch) | |
tree | 457539fe667ab977e5ff9e022c84a0aa1ef33996 /rpm | |
parent | 1fcfc21cd8cce3d44b2526f262be5c73e4d8621a (diff) |
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 <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes: #12073
Diffstat (limited to 'rpm')
-rw-r--r-- | rpm/generic/zfs.spec.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index b1750942f..b073d68a4 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -306,6 +306,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} |