diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,8 @@ else:
     extra_compile_args = []
 
 exec_results = {}
-exec(open(path.join(path.dirname(__file__), 'fuel/version.py')), exec_results)
+with open(path.join(path.dirname(__file__), 'fuel/version.py')) as file_:
+    exec(file_.read(), exec_results)
 version = exec_results['version']
 
 setup(
Use with statement and read the content to be Python3 compatible