setup: Fix regex failure to match version in case of CRLF line feeds

This could happen e.g. in case of using pip3 to install Telethon directly from the git repo.
This commit is contained in:
Dmitry D. Chernov 2018-02-24 18:25:08 +10:00
parent b7a61510bf
commit 760d84514f

View File

@ -110,7 +110,7 @@ def main():
long_description = f.read()
with open('telethon/version.py', encoding='utf-8') as f:
version = re.search(r"^__version__\s+=\s+'(.*)'$",
version = re.search(r"^__version__\s*=\s*'(.*)'.*$",
f.read(), flags=re.MULTILINE).group(1)
setup(
name='Telethon',