Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Commit

Permalink
Fixes setup.py for python3.
Browse files Browse the repository at this point in the history
Python3 requires explicit globals dictionary to be passed to `exec`
function.
  • Loading branch information
svetlyak40wt committed Oct 15, 2012
1 parent 547dc32 commit 92fc2fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
def get_version():
basedir = os.path.dirname(__file__)
with open(os.path.join(basedir, 'times/version.py')) as f:
VERSION = None
exec(f.read())
return VERSION
variables = {}
exec(f.read(), variables)
return variables.get('VERSION')
raise RuntimeError('No version info found.')


Expand Down

0 comments on commit 92fc2fc

Please sign in to comment.