summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/pythonw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
index 1d2db38..c8bd3ba 100644
--- a/Mac/Tools/pythonw.c
+++ b/Mac/Tools/pythonw.c
@@ -196,6 +196,15 @@ main(int argc, char **argv) {
}
}
+ /*
+ * The environment variable is used to pass the value of real_path
+ * to the actual python interpreter, and is read by code in
+ * Python/coreconfig.c.
+ *
+ * This way the real interpreter knows how the user invoked the
+ * interpreter and can behave as if this launcher is the real
+ * interpreter (looking for pyvenv configuration, ...)
+ */
setenv("__PYVENV_LAUNCHER__", real_path, 1);
}