summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-20 20:24:08 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-20 20:59:24 +1000
commit1f7da85c77f47b28a971374f42a1668a92398eb4 (patch)
tree4615ea139345bfa6042cbfa45ca17fb33aaa7da0 /source4/scripting
parent6072ab0d57487fcb9b00706b37898be003ff211b (diff)
downloadsamba-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.c5
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);