You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/lib/ansible_test/_internal/compat/packaging.py

17 lines
416 B
Python

"""Packaging compatibility."""
from __future__ import annotations
try:
from packaging import (
specifiers,
version,
)
SpecifierSet = specifiers.SpecifierSet
Version = version.Version
PACKAGING_IMPORT_ERROR = None
except ImportError as ex:
SpecifierSet = None # pylint: disable=invalid-name
Version = None # pylint: disable=invalid-name
PACKAGING_IMPORT_ERROR = ex