]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Correct a flaw in the Python 3 version checking
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Wed, 9 Jun 2021 00:20:16 +0000 (20:20 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 00:20:16 +0000 (18:20 -0600)
commit08cd0717359b1a18693e3c8e6d6e5a2819b35a48
tree457539fe667ab977e5ff9e022c84a0aa1ef33996
parent1fcfc21cd8cce3d44b2526f262be5c73e4d8621a
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
.github/workflows/zfs-tests-functional.yml
.github/workflows/zfs-tests-sanity.yml
.github/workflows/zloop.yml
config/always-pyzfs.m4
config/ax_python_devel.m4
rpm/generic/zfs.spec.in