Fix setup.py (#2431)

This commit is contained in:
Bibo-Joshi 2021-03-14 19:17:08 +01:00 committed by GitHub
parent 21ded420e2
commit 0bb4be55ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: