aports/testing/py3-pymaging/replace-pkg-resources.patch
mio 4e9a927a79 testing/py3-pymaging: rebuild against python 3.14
Fix `ModuleNotFoundError: No module named 'pkg_resources'` error when
building with setuptools 82.

Ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/18025
2026-04-01 02:20:15 +00:00

15 lines
666 B
Diff

diff -rupN a/pymaging/formats.py b/pymaging/formats.py
--- a/pymaging/formats.py 2013-09-08 13:12:02.000000000 +0000
+++ b/pymaging/formats.py 2026-03-31 21:03:10.910000000 +0000
@@ -49,8 +49,8 @@ class FormatRegistry(object):
if self.loaded:
return
with self.write_lock:
- import pkg_resources
- for entry_point in pkg_resources.iter_entry_points('pymaging.formats'):
+ from importlib.metadata import entry_points
+ for entry_point in entry_points(name='pymaging.formats'):
format = entry_point.load()
self.register(format)
self.loaded = True