瀏覽代碼

Merge pull request #255 from btabibian/master

adding globals() to exec call for python3 compatibility
Joshua Haberman 10 年之前
父節點
當前提交
cd141089a1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      python/setup.py

+ 1 - 1
python/setup.py

@@ -53,7 +53,7 @@ def GetVersion():
   protobuf library may be loaded instead."""
   protobuf library may be loaded instead."""
 
 
   with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
   with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
-    exec(version_file.read())
+    exec(version_file.read(), globals())
     return __version__
     return __version__