mirror of https://github.com/miaowware/qrm2.git
Merge branch 'master' into plugins
This commit is contained in:
commit
7ffe821f78
|
@ -9,7 +9,7 @@ jobs:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.9
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- name: Install flake8
|
- name: Install flake8
|
||||||
run: pip install flake8
|
run: pip install flake8
|
||||||
|
|
|
@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Renamed `?cond` to `?solar`.
|
- Renamed `?cond` to `?solar`.
|
||||||
- Reduced `?hamstudy` timeout to 5 minutes.
|
- Reduced `?hamstudy` timeout to 5 minutes.
|
||||||
- Library used for QRZ lookups.
|
- Library used for QRZ lookups.
|
||||||
|
- Python>=3.9 now required.
|
||||||
### Fixed
|
### Fixed
|
||||||
- Weird image caching situation for `?greyline` on Discord's side.
|
- Weird image caching situation for `?greyline` on Discord's side.
|
||||||
- The help command was not using the prefix it was invoked with.
|
- The help command was not using the prefix it was invoked with.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
1. [Fork this repo][1] into your own GitHub namespace.
|
1. [Fork this repo][1] into your own GitHub namespace.
|
||||||
1. Make sure the `master` branch is up to date, then make yourself a new branch with a descriptive name.
|
1. Make sure the `master` branch is up to date, then make yourself a new branch with a descriptive name.
|
||||||
1. Once the forked repo is cloned and on the proper branch, you can set up the development environment.
|
1. Once the forked repo is cloned and on the proper branch, you can set up the development environment.
|
||||||
1. Install python 3.7 or higher.
|
1. Install python 3.9 or higher.
|
||||||
1. Run `make dev-install`.
|
1. Run `make dev-install`.
|
||||||
This should install everything you need to develop and run qrm.
|
This should install everything you need to develop and run qrm.
|
||||||
1. [Create a bot and token][2], and add it to `data/keys.py`.
|
1. [Create a bot and token][2], and add it to `data/keys.py`.
|
||||||
|
|
31
Dockerfile
31
Dockerfile
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:3.10
|
FROM python:3.9-slim
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -6,35 +6,20 @@ WORKDIR /app
|
||||||
ENV PYTHON_BIN python3
|
ENV PYTHON_BIN python3
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install build packages ****" && \
|
apt-get update && \
|
||||||
apk add --no-cache --virtual=build-dependencies \
|
|
||||||
g++ \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt-dev \
|
|
||||||
libressl-dev \
|
|
||||||
libffi-dev \
|
|
||||||
jpeg-dev \
|
|
||||||
zlib-dev \
|
|
||||||
python3-dev && \
|
|
||||||
echo "**** install runtime packages ****" && \
|
echo "**** install runtime packages ****" && \
|
||||||
apk add --no-cache \
|
apt-get install -y --no-install-recommends \
|
||||||
libressl \
|
libcairo2 \
|
||||||
cairo \
|
libjpeg62-turbo \
|
||||||
libjpeg-turbo \
|
python-lxml \
|
||||||
py3-lxml \
|
&& \
|
||||||
py3-pip \
|
|
||||||
python3 && \
|
|
||||||
echo "**** install pip packages ****" && \
|
echo "**** install pip packages ****" && \
|
||||||
pip3 install -U pip setuptools wheel && \
|
pip3 install -U pip setuptools wheel && \
|
||||||
pip3 install -r requirements.txt && \
|
pip3 install -r requirements.txt && \
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apk del --purge \
|
|
||||||
build-dependencies && \
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/root/.cache \
|
/root/.cache \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/cache/apk/*
|
/var/lib/apt/lists/*
|
||||||
|
|
||||||
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]
|
CMD ["/bin/sh", "run.sh", "--pass-errors", "--no-botenv"]
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -12,7 +12,7 @@
|
||||||
# Those are the defaults; they can be over-ridden if specified
|
# Those are the defaults; they can be over-ridden if specified
|
||||||
# at en environment level or as 'make' arguments.
|
# at en environment level or as 'make' arguments.
|
||||||
BOTENV ?= botenv
|
BOTENV ?= botenv
|
||||||
PYTHON_BIN ?= python3.7
|
PYTHON_BIN ?= python3.9
|
||||||
PIP_OUTPUT ?= -q
|
PIP_OUTPUT ?= -q
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ See [README-DOCKER.md](./README-DOCKER.md)
|
||||||
|
|
||||||
### Without Docker
|
### Without Docker
|
||||||
|
|
||||||
Requires Python 3.7 or newer.
|
Requires Python 3.9 or newer.
|
||||||
|
|
||||||
Prep the environment. For more information on extra options, see the [quick-bot-no-pain Makefile documentation](https://github.com/0x5c/quick-bot-no-pain/blob/master/docs/makefile.md).
|
Prep the environment. For more information on extra options, see the [quick-bot-no-pain Makefile documentation](https://github.com/0x5c/quick-bot-no-pain/blob/master/docs/makefile.md).
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
discord.py~=1.5.0
|
discord.py~=1.6.0
|
||||||
ctyparser~=2.0
|
ctyparser~=2.0
|
||||||
gridtools~=1.0
|
gridtools~=1.0
|
||||||
qrztools[async]~=1.0
|
qrztools[async]~=1.0
|
||||||
|
|
4
run.sh
4
run.sh
|
@ -34,9 +34,9 @@ while [ ! -z "$1" ]; do
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# If $PYTHON_BIN is not defined, default to 'python3.7'
|
# If $PYTHON_BIN is not defined, default to 'python3.9'
|
||||||
if [ $_NO_BOTENV -eq 1 -a -z "$PYTHON_BIN" ]; then
|
if [ $_NO_BOTENV -eq 1 -a -z "$PYTHON_BIN" ]; then
|
||||||
PYTHON_BIN='python3.7'
|
PYTHON_BIN='python3.9'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue