Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.

This commit is contained in:
Georg Brandl 2008-01-07 17:09:35 +00:00
parent b3255ed8c9
commit 2da0fceba7
8 changed files with 56 additions and 8 deletions

View file

@ -1128,6 +1128,9 @@ _PySys_Init(void)
v = Py_BuildValue("(ssz)", "CPython", branch, svn_revision);
PyDict_SetItemString(sysdict, "subversion", v);
Py_XDECREF(v);
PyDict_SetItemString(sysdict, "dont_write_bytecode",
v = PyBool_FromLong(Py_DontWriteBytecodeFlag));
Py_XDECREF(v);
/*
* These release level checks are mutually exclusive and cover
* the field, so don't get too fancy with the pre-processor!