Use exec() for Py3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2013-03-30 04:41:32 +00:00
parent 16487fafa8
commit 25c53d08d4

View File

@@ -29,5 +29,11 @@ for wc in ['wxWidgets/configure',
# Now execute the real setup.py that was copied here in order to do whatever
# command was trying to be done before.
execfile('setup.py')
if sys.version_info < (3,):
execfile('setup.py')
else:
f = open('setup.py', 'r')
source = f.read()
f.close()
exec(source)