forked from infra/ansible
maubot: apply hotfix to maubot to fix __provides__ issue
related: infra/tickets#13347 Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
parent
1bde47906f
commit
623214b0c9
1 changed files with 2 additions and 0 deletions
|
|
@ -14,6 +14,8 @@ spec:
|
|||
FROM fedora:43
|
||||
RUN dnf -y install python3-pip python3-gssapi git libpq-devel gcc gcc-c++ python-devel cmake && dnf -y clean all
|
||||
RUN pip install maubot[encryption] python-slugify httpx httpx_gssapi jinja2 fedora-messaging meetbot-messages pydantic maubot-fedora-messages backoff arrow python-gitlab pytz
|
||||
# Python 3.14: register_handler_class must skip dir() names where getattr raises (__provides__)
|
||||
RUN python3 -c 'import importlib.util, pathlib, sys; p=pathlib.Path(importlib.util.find_spec("maubot").origin).parent/"plugin_base.py"; old=" for key in dir(obj):\n val = getattr(obj, key)\n"; new=" for key in dir(obj):\n try:\n val = getattr(obj, key)\n except AttributeError:\n continue\n"; t=p.read_text(); (sys.exit(0) if "except AttributeError:\n continue" in t else sys.exit("maubot patch: pattern not found") if old not in t else p.write_text(t.replace(old, new, 1)))'
|
||||
RUN \
|
||||
curl https://raw.githubusercontent.com/fedora-infra/matrix-bots/main/install-plugins-from-git.py -o /usr/local/bin/install-maubot-plugins && \
|
||||
chmod +x /usr/local/bin/install-maubot-plugins && \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue