From 0bb4be55ac5848c105619d4cb6044b7139970a56 Mon Sep 17 00:00:00 2001 From: Bibo-Joshi Date: Sun, 14 Mar 2021 19:17:08 +0100 Subject: [PATCH] Fix setup.py (#2431) --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 762288fd0..d847fff8a 100644 --- a/setup.py +++ b/setup.py @@ -53,8 +53,9 @@ def get_setup_kwargs(raw=False): fn = os.path.join('telegram', 'version.py') with open(fn) as fh: - code = compile(fh.read(), fn, 'exec') - exec(code) + for line in fh.readlines(): + if line.startswith('__version__'): + exec(line) with open(readme, 'r', encoding='utf-8') as fd: