From 6f664aa5d73b65865625cdbda6d2d69203dba8b2 Mon Sep 17 00:00:00 2001 From: Carlos Date: Fri, 2 Dec 2022 17:50:35 +0100 Subject: [PATCH] Add pypi backends to setup.py as a convience when installing errbot. (#1611) --- CHANGES.rst | 1 + Dockerfile | 6 +++--- setup.py | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 964b5464f6..56c584607c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,7 @@ features: - core/plugins: detect plugins using entrypoints (#1590) - core/logging: add new SENTRY_OPTIONS config (#1597) +- core/plugins: make slack, mattermost and discord backends available as install requirements (#1611) fixes: diff --git a/Dockerfile b/Dockerfile index 888e7fee92..f8a4872fa2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG BASE_IMAGE=python:3.9-slim -ARG INSTALL_EXTRAS=irc,XMPP,telegram +ARG INSTALL_EXTRAS=irc,XMPP,telegram,slack FROM ${BASE_IMAGE} AS build ARG INSTALL_EXTRAS @@ -7,7 +7,7 @@ WORKDIR /wheel COPY . . RUN apt update && apt install -y build-essential git RUN pip3 wheel --wheel-dir=/wheel \ - wheel . .[${INSTALL_EXTRAS}] errbot-backend-slackv3 + wheel . .[${INSTALL_EXTRAS}] FROM ${BASE_IMAGE} AS base ARG INSTALL_EXTRAS @@ -16,7 +16,7 @@ RUN apt update && \ apt install -y git && \ cd /wheel && \ pip3 -vv install --no-cache-dir --no-index --find-links /wheel \ - errbot errbot[${INSTALL_EXTRAS}] errbot-backend-slackv3 && \ + errbot errbot[${INSTALL_EXTRAS}] && \ rm -rf /wheel /var/lib/apt/lists/* RUN useradd -m errbot diff --git a/setup.py b/setup.py index 2c3055ff8f..45d1c0a9be 100755 --- a/setup.py +++ b/setup.py @@ -114,6 +114,15 @@ def read(fname, encoding="ascii"): ], }, extras_require={ + "slack": [ + "errbot-backend-slackv3==0.2.1", + ], + "discord": [ + "err-backend-discord==3.0.1", + ], + "mattermost": [ + "err-backend-mattermost==3.0.0", + ], "IRC": [ "irc==20.0.0", ],