diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-20 20:24:08 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-20 20:59:24 +1000 |
commit | 1f7da85c77f47b28a971374f42a1668a92398eb4 (patch) | |
tree | 4615ea139345bfa6042cbfa45ca17fb33aaa7da0 /source4/scripting | |
parent | 6072ab0d57487fcb9b00706b37898be003ff211b (diff) | |
download | samba-1f7da85c77f47b28a971374f42a1668a92398eb4.tar.gz samba-1f7da85c77f47b28a971374f42a1668a92398eb4.tar.bz2 samba-1f7da85c77f47b28a971374f42a1668a92398eb4.zip |
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.
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/modules.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <Python.h> #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); |