]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Correct a flaw in the Python 3 version checking (#12636)
authorRich Ercolani <214141+rincebrain@users.noreply.github.com>
Mon, 1 Nov 2021 21:54:47 +0000 (17:54 -0400)
committerGitHub <noreply@github.com>
Mon, 1 Nov 2021 21:54:47 +0000 (14:54 -0700)
commit8cd9f20a34c72f57d1748f27a79230fcdc41e9b8
tree32fd7fb7bef87ca495888d1021fee35a44736daa
parent71c6098526c6d5fbfa84a58cefe6cdc403488d8c
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
.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