From c4935caca72aa45cd436078e75da77cfa25020b9 Mon Sep 17 00:00:00 2001 From: Ereiarrus Date: Mon, 5 Feb 2024 03:08:05 +0000 Subject: [PATCH] more efficient Dockerfile maybe?; can't have new routines as commands! mistake --- Dockerfile | 10 +++++----- src/complements_bot/bot.py | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 62b4a42..023f247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,6 @@ FROM python:3.12-alpine3.19 WORKDIR /complements-bot-py ENV PYTHONPATH /complements-bot-py -COPY src ./src -COPY main.py . -RUN rm -rf ./src/test_complements_bot -RUN rm -rf ./src/test_app RUN pip install pipenv RUN apk update RUN apk add gcc @@ -16,9 +12,13 @@ RUN apk add libffi-dev RUN apk add openssl-dev RUN apk add cargo RUN apk add build-base +RUN pip install cython +COPY src ./src +COPY main.py . +RUN rm -rf ./src/test_complements_bot +RUN rm -rf ./src/test_app RUN cd ./src; pipenv install --system --deploy; cd .. RUN rm -rf /var/cache/apk/* -RUN pip install cython RUN python -m cython -3 --embed -o main.c main.py RUN gcc -Os -I $(python3-config --includes | grep python3.12) -o main main.c -lpython3.12 -lpthread -lutil $(python3-config --libs) CMD ["./main"] diff --git a/src/complements_bot/bot.py b/src/complements_bot/bot.py index e005837..0307c47 100644 --- a/src/complements_bot/bot.py +++ b/src/complements_bot/bot.py @@ -857,7 +857,6 @@ async def addcomplement(self, ctx: commands.Context) -> None: """ await ComplementsBot.send_and_log(ctx, (await self.addcomplement_h(ctx))) - @commands.command(aliases=["addcomp"]) async def addcomplement_h(self, ctx: commands.Context) -> Optional[str]: """ addcomplement() helper @@ -889,7 +888,6 @@ async def listcomplements(self, ctx: commands.Context) -> None: custom_log("listcomplements() loop", ComplementsBot.SHOULD_LOG) await ComplementsBot.send_and_log(ctx, msg) - @commands.command(aliases=["listcomps"]) async def listcomplements_h(self, ctx: commands.Context) -> Iterable[str]: """ listcomplements() helper