davemds pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=cadc757e7e7bd5ed33e41014dd70a8c78c256efe
commit cadc757e7e7bd5ed33e41014dd70a8c78c256efe Author: Dave Andreoli <[email protected]> Date: Sun Feb 27 10:52:50 2022 +0100 setup: use packaging instead of distutils for version check Distutils is deprecated in py3.10, and packaging is already a dependency of setuptools --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 47e007a..6970c4a 100755 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ import time import platform import subprocess import unittest -from distutils.version import LooseVersion from setuptools import setup, Extension, Command +from packaging.version import Version script_path = os.path.dirname(os.path.abspath(__file__)) @@ -98,7 +98,7 @@ def pkg_config(name, require, min_vers=None): raise SystemExit('Cannot find %s with pkg-config.' % name) if min_vers is not None: - assert LooseVersion(ver) >= LooseVersion(min_vers) + assert Version(ver) >= Version(min_vers) sys.stdout.write('OK, found %s\n' % ver) cflags = cmd_output('pkg-config --cflags %s' % require).split() @@ -142,7 +142,7 @@ if set(('build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist')) & set raise SystemExit('not found! Needed >= %s' % (CYTHON_MIN_VERSION)) # check min version - if LooseVersion(Cython.__version__) < LooseVersion(CYTHON_MIN_VERSION): + if Version(Cython.__version__) < Version(CYTHON_MIN_VERSION): raise SystemExit('too old! Found %s Needed %s' % ( Cython.__version__, CYTHON_MIN_VERSION)) --
