Joseph Weston authored on 06/08/2018 09:40:24
Showing 3 changed files
... ...
@@ -1,2 +1,3 @@
1
+__all__ = ['__version__']
1 2
 from ._version import __version__
2
-del _version
3
+del _version  # remove to avoid confusion with __version__
... ...
@@ -73,9 +73,10 @@ def get_version_from_git():
73 73
     # that were merged-in.
74 74
     for opts in [['--first-parent'], []]:
75 75
         try:
76
-            p = subprocess.Popen(['git', 'describe', '--long'] + opts,
77
-                                 cwd=distr_root,
78
-                                 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
76
+            p = subprocess.Popen(
77
+                ['git', 'describe', '--long'] + opts,
78
+                cwd=distr_root,
79
+                stdout=subprocess.PIPE, stderr=subprocess.PIPE)
79 80
         except OSError:
80 81
             return
81 82
         if p.wait() == 0:
... ...
@@ -94,7 +95,7 @@ def get_version_from_git():
94 95
     try:
95 96
         p = subprocess.Popen(['git', 'diff', '--quiet'], cwd=distr_root)
96 97
     except OSError:
97
-        labels.append('confused') # This should never happen.
98
+        labels.append('confused')  # This should never happen.
98 99
     else:
99 100
         if p.wait() == 1:
100 101
             labels.append('dirty')
... ...
@@ -132,6 +133,7 @@ def get_version_from_git_archive(version_info):
132 133
 
133 134
 __version__ = get_version()
134 135
 
136
+
135 137
 # The following section defines a module global 'cmdclass',
136 138
 # which can be used from setup.py. The 'package_name' and
137 139
 # '__version__' module globals are used (but not modified).
... ...
@@ -7,6 +7,7 @@ if sys.version_info < (3, 5):
7 7
     print('Miniver needs at least Python 3.5.')
8 8
     sys.exit(1)
9 9
 
10
+
10 11
 # Loads version.py module without importing the whole package.
11 12
 def get_version_and_cmdclass(package_name):
12 13
     import os