<html><body><div style="color:#000; background-color:#fff; font-family:lucida console, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1432923194984_7280" dir="ltr">If it were up to me, I'd fill out the version number directly and update it on each release by hand rather than tussle with pulling it out of the version control. Maybe I'm missing something; what is the motivation for the parsing that we do here? <a id="yui_3_16_0_1_1432923194984_7766" href="https://www.selenic.com/repo/python-hglib/file/ec935041d1ff/setup.py#l4">https://www.selenic.com/repo/python-hglib/file/ec935041d1ff/setup.py#l4</a><br></div><div style="" class="" id="yui_3_16_0_1_1432923194984_7280" dir="ltr"><br></div><br><div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: lucida console, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Thursday, May 28, 2015 5:38 AM, Yuya Nishihara <yuya@tcha.org> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">On Wed, 27 May 2015 14:33:28 -0400, Augie Fackler wrote:<div class="yqt3535815347" id="yqtfd12247"><br clear="none">> mpm, as an FYI here's an hglib patch that I'm just delegating to you.<br clear="none">> On Tue, May 26, 2015 at 10:56:29PM +0000, Peter Elmers wrote:<br clear="none">> > # HG changeset patch<br clear="none">> > # User Peter Elmers <<a shape="rect" ymailto="mailto:peter.elmers@yahoo.com" href="mailto:peter.elmers@yahoo.com">peter.elmers@yahoo.com</a>><br clear="none">> > # Date 1432680605 25200<br clear="none">> > #      Tue May 26 15:50:05 2015 -0700<br clear="none">> > # Node ID 9afa1d6c9da357b3f61f7e4eb4b08390c4bc5fd1<br clear="none">> > # Parent  ec935041d1ff0fd2aa8cb666d79e6dcca398ddba<br clear="none">> > version: declare a default version in setup.py (issue3924)<br clear="none">> ><br clear="none">> > Leaving version as "unknown" breaks `pip freeze`, so we should default the<br clear="none">> > version to the current version and let it update itself if a more precise one<br clear="none">> > can be pulled from version control.<br clear="none">> ><br clear="none">> > diff -r ec935041d1ff -r 9afa1d6c9da3 setup.py<br clear="none">> > --- a/setup.py    Wed Apr 01 13:34:58 2015 -0500<br clear="none">> > +++ b/setup.py    Tue May 26 15:50:05 2015 -0700<br clear="none">> > @@ -2,7 +2,7 @@<br clear="none">> >  from distutils.core import setup<br clear="none">> ><br clear="none">> >  # query Mercurial for version number<br clear="none">> > -version = 'unknown'<br clear="none">> > +version = '1.6'</div><br clear="none"><br clear="none">Perhaps we can parse PKG-INFO file just like we do for .hg_archival.txt.<br clear="none"><br clear="none"><a shape="rect" href="https://www.python.org/dev/peps/pep-0314/" target="_blank">https://www.python.org/dev/peps/pep-0314/</a><div class="yqt3535815347" id="yqtfd78446"><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>