diff options
author | Barry Warsaw <barry@python.org> | 2005-12-18 01:27:35 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2005-12-18 01:27:35 (GMT) |
commit | 2a38a86c1c48adbf9cf76d485c515002f042fd56 (patch) | |
tree | 728b60b9fdc895f23a1a18dca41d49ce38a5ce62 /Doc | |
parent | 11ca77e6deb795a697ce00849c2f081e9bdbabb7 (diff) | |
download | cpython-2a38a86c1c48adbf9cf76d485c515002f042fd56.zip cpython-2a38a86c1c48adbf9cf76d485c515002f042fd56.tar.gz cpython-2a38a86c1c48adbf9cf76d485c515002f042fd56.tar.bz2 |
Expose Subversion revision number (calculated via "svnversion .") to Python.
Add C API function Py_GetBuildNumber(), add it to the interactive prompt
banner (i.e. Py_GetBuildInfo()), and add it as the sys.build_number
attribute. The build number is a string instead of an int because it may
contain a trailing 'M' if there are local modifications.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/init.tex | 6 | ||||
-rw-r--r-- | Doc/lib/libsys.tex | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/api/init.tex b/Doc/api/init.tex index 51b925f..67f74a1 100644 --- a/Doc/api/init.tex +++ b/Doc/api/init.tex @@ -272,6 +272,12 @@ \withsubitem{(in module sys)}{\ttindex{version}} \end{cfuncdesc} +\begin{cfuncdesc}{const char*}{Py_GetBuildNumber}{} + Return a string representing the Subversion revision that this Python + executable was built from. This number is a string because it may contain a + trailing 'M' if Python was built from a mixed revision source tree. +\end{cfuncdesc} + \begin{cfuncdesc}{const char*}{Py_GetPlatform}{} Return the platform identifier for the current platform. On \UNIX, this is formed from the ``official'' name of the operating system, diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex index 4efe5f6..7ffa35d 100644 --- a/Doc/lib/libsys.tex +++ b/Doc/lib/libsys.tex @@ -27,6 +27,12 @@ It is always available. \versionadded{2.0} \end{datadesc} +\begin{datadesc}{build_number} + A string representing the Subversion revision that this Python executable + was built from. This number is a string because it may contain a trailing + 'M' if Python was built from a mixed revision source tree. +\end{datadesc} + \begin{datadesc}{builtin_module_names} A tuple of strings giving the names of all modules that are compiled into this Python interpreter. (This information is not available in |