summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 3fab81a..786f2b1 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -2458,6 +2458,12 @@ _PySys_EndInit(PyObject *sysdict, _PyMainInterpreterConfig *config)
SET_SYS_FROM_STRING_BORROW("exec_prefix", config->exec_prefix);
SET_SYS_FROM_STRING_BORROW("base_exec_prefix", config->base_exec_prefix);
+ if (config->pycache_prefix != NULL) {
+ SET_SYS_FROM_STRING_BORROW("pycache_prefix", config->pycache_prefix);
+ } else {
+ PyDict_SetItemString(sysdict, "pycache_prefix", Py_None);
+ }
+
if (config->argv != NULL) {
SET_SYS_FROM_STRING_BORROW("argv", config->argv);
}