Switch from the deprecated distutils module to the packaging module

The distutils module was removed in Python 3.12.
This commit is contained in:
Jordan Williams
2023-12-01 09:53:50 -06:00
committed by Philip Withnall
parent 9cd7cccdd3
commit 6ef967a0f9
5 changed files with 9 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>
import distutils.version
import packaging.version
import os
import sys
@@ -166,4 +166,4 @@ def version_cmp_key(key):
v = str(key[0])
else:
v = "0"
return (distutils.version.LooseVersion(v), key[1])
return (packaging.version.Version(v), key[1])