From 1f7da85c77f47b28a971374f42a1668a92398eb4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Apr 2010 20:24:08 +1000 Subject: s4-python: added PYTHONDIR to python search path we put it after the scripting/python dir, so we look in the build directory (if applicable) first. --- source4/scripting/python/modules.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index 198b3ccf12..788df91bb4 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -20,6 +20,7 @@ #include #include "includes.h" #include "scripting/python/modules.h" +#include "dynconfig/dynconfig.h" extern void init_ldb(void); extern void init_security(void); @@ -89,6 +90,10 @@ bool py_update_path(const char *bindir) return false; } + if (!PySys_PathPrepend(py_path, dyn_PYTHONDIR)) { + return false; + } + asprintf(&newpath, "%s/../scripting/python", bindir); if (!PySys_PathPrepend(py_path, newpath)) { free(newpath); -- cgit