python-zope-event: fix build with setuptools >= 81
authorAlexandru Ardelean <redacted>
Sat, 25 Apr 2026 18:52:56 +0000 (21:52 +0300)
committerAlexandru Ardelean <redacted>
Mon, 27 Apr 2026 05:25:02 +0000 (08:25 +0300)
The pyproject.toml for zope.event 6.1 specifies a strict build
dependency of setuptools>=78.1.1,<81. We currently package
setuptools>=81, causing pip to report a missing dependency and
fail the build.

Add patch 001-relax-setuptools-version.patch to drop the <81 upper
bound, allowing the package to build with any recent setuptools.

Add test.sh to verify the installed version and exercise the core
event API (subscribers list, notify(), event dispatch).

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-zope-event/patches/001-relax-setuptools-version.patch [new file with mode: 0644]
lang/python/python-zope-event/test.sh [new file with mode: 0644]

diff --git a/lang/python/python-zope-event/patches/001-relax-setuptools-version.patch b/lang/python/python-zope-event/patches/001-relax-setuptools-version.patch
new file mode 100644 (file)
index 0000000..37d3adf
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -3,7 +3,7 @@
+ [build-system]
+ requires = [
+-    "setuptools >= 78.1.1,< 81",
++    "setuptools >= 78.1.1",
+     "wheel",
+ ]
+ build-backend = "setuptools.build_meta"
diff --git a/lang/python/python-zope-event/test.sh b/lang/python/python-zope-event/test.sh
new file mode 100644 (file)
index 0000000..c41c080
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+[ "$1" = python3-zope-event ] || exit 0
+
+python3 - << 'PYEOF'
+# Verify core API: subscribers list and notify function
+import zope.event
+assert hasattr(zope.event, 'subscribers'), "missing subscribers list"
+assert callable(zope.event.notify), "missing notify()"
+
+# Exercise notify: register a subscriber and fire an event
+received = []
+zope.event.subscribers.append(received.append)
+zope.event.notify("test-event")
+assert received == ["test-event"], f"event not received: {received!r}"
+
+print("python3-zope-event OK")
+PYEOF
git clone https://git.99rst.org/PROJECT