Drop packaging requirement

Change-Id: I11d306be5e5bb3d5b05b50dd8ee64ac9424854a1
(cherry picked from commit 968711579f)
This commit is contained in:
Michal Nasiadka 2024-05-23 15:14:53 +02:00 committed by Bartosz Bezak
parent ba0aebd673
commit 2f0ae8ba2a

View File

@ -114,16 +114,13 @@ def run_build():
if conf.engine == engine.Engine.DOCKER.value:
try:
import docker
import packaging
packaging.version.parse(docker.__version__)
except ImportError:
docker.__version__
except ImportError as e:
LOG.error("Error, you have set Docker as container engine, "
"but the Python library is not found."
"Try running 'pip install docker'")
"Try running 'pip install docker'\n"
"Python error: %s", e)
sys.exit(1)
except AttributeError:
LOG.error("Error, Docker Python library is too old, "
"Try running 'pip install docker --upgrade'")
if conf.squash:
squash_version = utils.get_docker_squash_version()
LOG.info('Image squash is enabled and "docker-squash" version '
@ -133,10 +130,11 @@ def run_build():
try:
import podman
podman.__version__
except ImportError:
LOG.error("Error, you have set podman as container engine, "
"but library is not found."
"Try running pip install podman")
except ImportError as e:
LOG.error("Error, you have set Podman as container engine, "
"but the Python library is not found."
"Try running 'pip install podman'\n"
"Python error: %s", e)
exit(1)
kolla = KollaWorker(conf)