Add execfile function since it's missing in python 3.

This commit is contained in:
Jacob Bom 2016-08-10 20:59:11 +02:00
parent dd4c0f0f1d
commit 8475c322af

View file

@ -16,6 +16,13 @@ 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'))
@ -47,4 +54,4 @@ with codecs.open('README.rst', 'r', 'utf-8') as fd:
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],)
], )