mirror of
https://github.com/python/cpython.git
synced 2025-10-05 06:31:48 +00:00
* bpo-27593: Get SCM build info from git instead of hg. (#446) sys.version and the platform module python_build(), python_branch(), and python_revision() functions now use git information rather than hg when building from a repo. Based on original patches by Brett Cannon and Steve Dower. (cherry picked from commit5c4b0d063a
) (cherry picked from commit95c50e5aed
)
This commit is contained in:
parent
2df52acce2
commit
a2edd3ae40
9 changed files with 80 additions and 83 deletions
|
@ -1816,9 +1816,9 @@ _PySys_Init(void)
|
|||
PyUnicode_FromString(Py_GetVersion()));
|
||||
SET_SYS_FROM_STRING("hexversion",
|
||||
PyLong_FromLong(PY_VERSION_HEX));
|
||||
SET_SYS_FROM_STRING("_mercurial",
|
||||
Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(),
|
||||
_Py_hgversion()));
|
||||
SET_SYS_FROM_STRING("_git",
|
||||
Py_BuildValue("(szz)", "CPython", _Py_gitidentifier(),
|
||||
_Py_gitversion()));
|
||||
SET_SYS_FROM_STRING("dont_write_bytecode",
|
||||
PyBool_FromLong(Py_DontWriteBytecodeFlag));
|
||||
SET_SYS_FROM_STRING("api_version",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue