--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ def main():
     # Get version and release info, which is all stored in heudiconv/info.py
     info_file = op.join(thispath, 'heudiconv', 'info.py')
     with open(info_file) as infofile:
-        exec(infofile.read(), globals(), ldict)
+        exec infofile.read() in globals(), ldict
 
 
     def findsome(subdir, extensions):
