diff options
author | Alan Somers <asomers@FreeBSD.org> | 2023-03-21 15:02:58 +0000 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2023-03-21 15:05:28 +0000 |
commit | 97d1d164cab342554bc413f269bab95752d3e704 (patch) | |
tree | c6f5d725f8ae7d5b9d77eccfea88caf70d7e1c90 /sysutils | |
parent | 8274fea49b80d295eedc575ac8fc97dd33e34bc0 (diff) | |
download | ports-97d1d164cab342554bc413f269bab95752d3e704.tar.gz ports-97d1d164cab342554bc413f269bab95752d3e704.zip |
sysutils/py-salt: fix runtime conflict with py39-importlib-metadata
PR: 269858
Approved by: maintainer timeout
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/py-salt/Makefile | 1 | ||||
-rw-r--r-- | sysutils/py-salt/files/patch-salt_utils_entrypoints.py | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sysutils/py-salt/Makefile b/sysutils/py-salt/Makefile index 5a29f0beb390..b32abac6a4de 100644 --- a/sysutils/py-salt/Makefile +++ b/sysutils/py-salt/Makefile @@ -1,5 +1,6 @@ PORTNAME= salt PORTVERSION= 3005.1 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/sysutils/py-salt/files/patch-salt_utils_entrypoints.py b/sysutils/py-salt/files/patch-salt_utils_entrypoints.py new file mode 100644 index 000000000000..6dcfa3725648 --- /dev/null +++ b/sysutils/py-salt/files/patch-salt_utils_entrypoints.py @@ -0,0 +1,27 @@ +--- salt/utils/entrypoints.py.orig 2022-09-26 21:22:01 UTC ++++ salt/utils/entrypoints.py +@@ -38,13 +38,20 @@ def iter_entry_points(group, name=None): + entry_points_listing = [] + entry_points = importlib_metadata.entry_points() + +- for entry_point_group, entry_points_list in entry_points.items(): +- if entry_point_group != group: +- continue +- for entry_point in entry_points_list: ++ try: ++ for entry_point in entry_points.select(group=group): + if name is not None and entry_point.name != name: + continue + entry_points_listing.append(entry_point) ++ except AttributeError: ++ # importlib-metadata<5.0.0 ++ for entry_point_group, entry_points_list in entry_points.items(): ++ if entry_point_group != group: ++ continue ++ for entry_point in entry_points_list: ++ if name is not None and entry_point.name != name: ++ continue ++ entry_points_listing.append(entry_point) + + return entry_points_listing + |