# HG changeset patch # User Mathias De Mare # Date 1678357984 -3600 # Node ID ae6427d1c8f7c84d114343defbc18ad3628a137e # Parent 8341f2494b3fc1c0d9ee55fa4487c0ac82f64d2a hglib: try to fix version to comply with PEP440 diff -r 8341f2494b3f -r ae6427d1c8f7 setup.py --- a/setup.py Wed Mar 08 17:04:58 2023 +0100 +++ b/setup.py Thu Mar 09 11:33:04 2023 +0100 @@ -13,8 +13,9 @@ if l[0].endswith('+'): # propagate the dirty status to the tag version += '+' elif len(l) == 1: # no tag found - cmd = 'hg parents --template "{latesttag}+{latesttagdistance}-"' - version = os.popen(cmd).read() + l[0] + cmd1 = 'hg parents --template "{latesttag}"' + cmd2 = 'hg parents --template "{latesttagdistance}"' + version = os.popen(cmd1).read() + ".dev" + os.popen(cmd2).read() if version.endswith('+'): version += time.strftime('%Y%m%d') elif os.path.exists('.hg_archival.txt'):