[Python-Dev] Expose Subversion revision number to Python

Armin Rigo arigo at tunes.org
Sun Dec 18 18:58:08 CET 2005


Hi Barry,

On Sat, Dec 17, 2005 at 08:28:17PM -0500, Barry Warsaw wrote:
> Done. r41744.

Doesn't appear to work for me: sys.build_number receives the value from
the buildno.  Looking at the Makefile, the reason is that I'm building
CPython in a separate directory (running '/some/path/configure; make').

Running 'svnversion .' by hand is quite fast if the whole tree of files
is in the cache.  My guess is that if you do 'svn up; make' then the
tree will indeed be in the cache, so the extra build time shouldn't be
noticeable in this common case (unless you are low on RAM).

Do we have any plan to make sys.build_number meaningful in the releases
as well (generally compiled from an svn export, as Michael pointed out),
or are we happy with a broken number in this case?

Should I propose / check-in a patch to expose sys.build_info instead
("CPython", "41761", "trunk"), as this got positive feedback so far?
It's also less surprizing than the current sys.build_number, which is a
string despite its name.


A bientot,

Armin


More information about the Python-Dev mailing list