Fix the build with setuptools >= 71
The `pkg_resources` module no longer bundles a vendored version of the `packaging` module. Add an explicit dependency on `packaging` and directly use its classes. Change-Id: I9362ca6d6323b56bc579db30e7f5bb40b57da65a
This commit is contained in:
parent
413e765aea
commit
7bf0dacd80
@ -18,10 +18,10 @@
|
||||
import inspect
|
||||
import logging
|
||||
import operator
|
||||
import packaging.version
|
||||
import pkg_resources
|
||||
import sys
|
||||
import types
|
||||
from pkg_resources.extern.packaging.version import InvalidVersion
|
||||
|
||||
from six import PY2
|
||||
|
||||
@ -76,8 +76,8 @@ class ModuleRegistry(object):
|
||||
version = plugin_info["version"]
|
||||
|
||||
try:
|
||||
pkg_resources.parse_version(version)
|
||||
except InvalidVersion:
|
||||
packaging.version.Version(version)
|
||||
except packaging.version.InvalidVersion:
|
||||
plugin_name = short_name or long_name
|
||||
if plugin_name:
|
||||
logger.warning(
|
||||
|
@ -9,5 +9,5 @@ stevedore>=1.17.1; python_version >= '3.0' # Apache-2.0
|
||||
python-jenkins>=1.8.2
|
||||
fasteners
|
||||
Jinja2
|
||||
setuptools==69.5.1; python_version >= '3.8'
|
||||
setuptools; python_version < '3.8'
|
||||
packaging
|
||||
setuptools
|
||||
|
Loading…
Reference in New Issue
Block a user