From 7c647b57e396f7bca492f4ff64476428cc9dc7f2 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 17 Feb 2018 12:14:23 +0100 Subject: [PATCH] Mention cryptg as an optional dependency --- optional-requirements.txt | 1 + readthedocs/extra/basic/installation.rst | 7 +++++++ requirements.txt | 2 ++ setup.py | 5 ++++- 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 optional-requirements.txt create mode 100644 requirements.txt diff --git a/optional-requirements.txt b/optional-requirements.txt new file mode 100644 index 00000000..5631ec03 --- /dev/null +++ b/optional-requirements.txt @@ -0,0 +1 @@ +cryptg diff --git a/readthedocs/extra/basic/installation.rst b/readthedocs/extra/basic/installation.rst index e74cdae6..0f812127 100644 --- a/readthedocs/extra/basic/installation.rst +++ b/readthedocs/extra/basic/installation.rst @@ -33,6 +33,13 @@ If you don't have root access, simply pass the ``--user`` flag to the pip command. If you want to install a specific branch, append ``@branch`` to the end of the first install command. +By default the library will use a pure Python implementation for encryption, +which can be really slow when uploading or downloading files. If you don't +mind using a C extension, install `cryptg `__ +via ``pip`` or as an extra: + + ``pip3 install telethon[cryptg]`` + Manual Installation ******************* diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..2b650ec4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pyaes +rsa diff --git a/setup.py b/setup.py index 2682e099..85e77a74 100755 --- a/setup.py +++ b/setup.py @@ -149,7 +149,10 @@ def main(): 'telethon_generator', 'telethon_tests', 'run_tests.py', 'try_telethon.py' ]), - install_requires=['pyaes', 'rsa'] + install_requires=['pyaes', 'rsa'], + extras_require={ + 'cryptg': ['cryptg'] + } )