Skip to content

Commit

Permalink
RF: use exec to read info file (Python 3 compat)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed May 31, 2016
1 parent 09df5a3 commit 11dfd6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

# Get version and release info, which is all stored in datarray/version.py
ver_file = os.path.join('datarray', 'version.py')
execfile(ver_file)
# Use exec on contents for Python 3 compatibility
with open(ver_file, 'rt') as fobj:
exec(fobj.read())

opts = dict(name=NAME,
maintainer=MAINTAINER,
Expand Down

0 comments on commit 11dfd6f

Please sign in to comment.