Skip to content

Commit b2178dc

Browse files
committed
MNT: Restore VERSION file hack
1 parent 1a1b913 commit b2178dc

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

versioneer.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,22 @@ def get_versions():
10521052
except NotThisMethod:
10531053
pass
10541054
1055+
root = os.path.realpath(__file__)
1056+
1057+
root_dir = os.path.dirname(root)
1058+
if os.path.isfile(os.path.join(root_dir, 'VERSION')):
1059+
with open(os.path.join(root_dir, 'VERSION')) as vfile:
1060+
version = vfile.readline().strip()
1061+
1062+
return {
1063+
"version": version,
1064+
"full-revisionid": None,
1065+
"dirty": None,
1066+
"error": None,
1067+
"date": None
1068+
}
1069+
10551070
try:
1056-
root = os.path.realpath(__file__)
10571071
# versionfile_source is the relative path from the top of the source
10581072
# tree (where the .git directory might live) to this file. Invert
10591073
# this to find the root from __file__.

0 commit comments

Comments
 (0)