Browse Source

global __version__ In setup.py (#4753)

This change helps both humans and linters to understand the unusual method of instantiating this global variable.
cclauss 7 năm trước cách đây
mục cha
commit
35567c1668
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      python/setup.py

+ 1 - 0
python/setup.py

@@ -44,6 +44,7 @@ def GetVersion():
 
   with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
     exec(version_file.read(), globals())
+    global __version__
     return __version__