mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 23:12:02 +08:00
3a11691a19
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 <alex@shruggie.ro>
19 lines
534 B
Bash
19 lines
534 B
Bash
#!/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
|