Move the exec out of function, since that's a whole other scope...

This commit is contained in:
Jacob Bom 2016-08-11 13:08:28 +02:00
parent c252042ddf
commit b736e1e855

View file

@ -17,14 +17,11 @@ def requirements():
return requirements_list
def execfile(fn):
with open(fn) as f:
code = compile(f.read(), fn, 'exec')
exec(code)
with codecs.open('README.rst', 'r', 'utf-8') as fd:
execfile(os.path.join('telegram', 'version.py'))
fn = os.path.join('telegram', 'version.py')
with open(fn) as fh:
code = compile(fh.read(), fn, 'exec')
exec(code)
setup(name='python-telegram-bot',
version=__version__,