Read about our upcoming Code of Conduct on this issue

Commit 1ee788b6 authored by Jörg Sonnenberger's avatar Jörg Sonnenberger
Browse files

packaging: extract pre-computed version when running from plain tarball

The tarballs created by are not including the usual archive
markers that `hg archive` leaves, so the rewrite of the version number
computation actually left the empty version string around. This meant
that installations from PyPI would use 0.0.0 as version string.

Differential Revision:

branch : stable
parent 01264552a1dc
Pipeline #20939 failed with stages
in 33 minutes and 9 seconds
......@@ -437,6 +437,9 @@ elif os.path.exists('.hg_archival.txt'):
version = '%(latesttag)s+hg%(latesttagdistance)s.%(node).12s' % kw
version = '0+hg' + kw.get('node', '')[:12]
elif os.path.exists('mercurial/'):
data = open('mercurial/').read()
version ='version = b"(.*)"', data).group(1)
if version:
versionb = version
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment