[Python-Dev] Expose Subversion revision number to Python (original) (raw)
Barry Warsaw barry at python.org
Fri Dec 16 06:16:49 CET 2005
- Previous message: [Python-Dev] Needed tester for patch in urllib.py module
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
SF patch # 1382163 is a fairly simple patch to expose the Subversion revision number to Python, both in the Py_GetBuildInfo() text, and in a new Py_GetBuildNumber() C API function, and via a new sys.build_number 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
-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20051216/15ebad1b/attachment-0001.pgp
- Previous message: [Python-Dev] Needed tester for patch in urllib.py module
- Next message: [Python-Dev] Expose Subversion revision number to Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]