mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
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.
This commit is contained in:
parent
11ca77e6de
commit
2a38a86c1c
7 changed files with 32 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue