Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker build #16

Merged
merged 3 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,17 @@ RUN apk add --no-cache \
yq

COPY requirements.txt /opt/mautrix-telegram/requirements.txt
COPY optional-requirements.txt /opt/mautrix-telegram/optional-requirements.txt
WORKDIR /opt/mautrix-telegram
RUN apk add --virtual .build-deps \
python3-dev \
libffi-dev \
build-base \
&& sed -Ei 's/psycopg2-binary.+//' optional-requirements.txt \
# TODO: unpin Pillow here after it's updated in Alpine
&& pip3 install -r requirements.txt -r optional-requirements.txt 'pillow==8.2' \
&& apk del .build-deps

COPY . /opt/mautrix-telegram
RUN apk add git && pip3 install .[speedups,hq_thumbnails,metrics,e2be] \
&& pip3 install 'git+https://github.com/vector-im/[email protected]#egg=mautrix' \
RUN apk add git \
&& apk add --virtual .build-deps python3-dev libffi-dev build-base \
&& pip3 install .[speedups,hq_thumbnails,metrics,e2be] \
# TODO: unpin Pillow here after it's updated in Alpine
&& pip3 install -r requirements.txt 'pillow==8.2' \
&& pip3 install 'git+https://github.com/vector-im/[email protected]#egg=mautrix' \
&& apk del git \
&& apk del .build-deps \
&& cp mautrix_telegram/example-config.yaml . && rm -rf mautrix_telegram

VOLUME /data
Expand Down
14 changes: 0 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
with open("requirements.txt") as reqs:
install_requires = reqs.read().splitlines()

with open("optional-requirements.txt") as reqs:
extras_require = {}
current = []
for line in reqs.read().splitlines():
if line.startswith("#/"):
extras_require[line[2:]] = current = []
elif not line or line.startswith("#"):
continue
else:
current.append(line)

extras_require["all"] = list({dep for deps in extras_require.values() for dep in deps})

try:
long_desc = open("README.md").read()
except IOError:
Expand Down Expand Up @@ -48,7 +35,6 @@
packages=setuptools.find_packages(),

install_requires=install_requires + ['psycopg2', 'uvloop'],
extras_require=extras_require,
python_requires="~=3.7",

setup_requires=["pytest-runner"],
Expand Down