Skip to content

Commit

Permalink
Merge pull request #15 from vector-im/jaller94-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaller94 authored Nov 18, 2021
2 parents 1c6c9d5 + fffa428 commit a7c8c18
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
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/mautrix-python@bump-conn-pool-limit#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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The Element fork includes the following changes:
- Make max_initial_member_sync work for Chats as well as Channels https://github.com/mautrix/telegram/pull/680
- Allow disabling user status updates from Telegram side https://github.com/vector-im/mautrix-telegram/pull/9
- Add `psycopg2`, `uvloop` to requirements.txt, install_requires https://github.com/vector-im/mautrix-telegram/pull/10/files
- Add metrics about Matrix API calls https://github.com/mautrix/python/pull/68

Some changes that appear here may get upstreamed to https://github.com/mautrix/telegram, and will be removed from
the list when they appear in both versions.
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

0 comments on commit a7c8c18

Please sign in to comment.