[Python-Dev] Expose Subversion revision number to Python (original) (raw)
Brett Cannon bcannon at gmail.com
Fri Dec 16 07:13:32 CET 2005
- Previous message: [Python-Dev] Expose Subversion revision number to Python
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/15/05, Barry Warsaw <barry at python.org> wrote:
SF patch # 1382163 is a fairly simple patch to expose the Subversion revision number to Python, both in the PyGetBuildInfo() text, and in a new PyGetBuildNumber() C API function, and via a new sys.buildnumber attribute. This number is calculated from the output of "svn info" at the top of the tree. If not building Python from a Subversion checkout, the old way of calculating buildno is kept.
(Of course, this change only gets the right number into the Unix build. Someone else can hopefully add the necessary magic for Windows. Patch tested only on Linux though.) Is there any interest in this patch? I'm happy to commit it if there are no objections. -Barry Python 2.5a0 (#41708, Dec 15 2005, 23:59:14) [GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.buildnumber 41708
+0
It makes it easy to request the revision number from people who submit
patches and bugs. But I also don't find it vital since running svn info .
.
-Brett
- Previous message: [Python-Dev] Expose Subversion revision number to Python
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]