setup.py
branchstable
changeset 46996 8d2b62d716b0
parent 46869 ed286d150aa8
child 47007 fceccc36873d
--- a/setup.py	Tue Apr 20 11:12:20 2021 -0400
+++ b/setup.py	Tue Apr 20 20:35:46 2021 +0200
@@ -437,6 +437,9 @@
             version = '%(latesttag)s+hg%(latesttagdistance)s.%(node).12s' % kw
     else:
         version = '0+hg' + kw.get('node', '')[:12]
+elif os.path.exists('mercurial/__version__.py'):
+    data = open('mercurial/__version__.py').read()
+    version = re.search('version = b"(.*)"', data).group(1)
 
 if version:
     versionb = version