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 years ago
parent
commit
35567c1668
1 changed files with 1 additions and 0 deletions
  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__