Skip to content

Commit 8475c32

Browse files
committed
Add execfile function since it's missing in python 3.
1 parent dd4c0f0 commit 8475c32

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ def requirements():
1616

1717
return requirements_list
1818

19+
20+
def execfile(fn):
21+
with open(fn) as f:
22+
code = compile(f.read(), fn, 'exec')
23+
exec(code)
24+
25+
1926
with codecs.open('README.rst', 'r', 'utf-8') as fd:
2027
execfile(os.path.join('telegram', 'version.py'))
2128

@@ -47,4 +54,4 @@ def requirements():
4754
'Programming Language :: Python :: 3.3',
4855
'Programming Language :: Python :: 3.4',
4956
'Programming Language :: Python :: 3.5',
50-
],)
57+
], )

0 commit comments

Comments
 (0)