]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- patch from Tom Hendrikx fixes load of python modules.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 9 Aug 2011 07:28:22 +0000 (07:28 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 9 Aug 2011 07:28:22 +0000 (07:28 +0000)
git-svn-id: file:///svn/unbound/trunk@2470 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
pythonmod/pythonmod.c

index d28189130cb8e80d5c79c5f0ac7a5b416a9a48be..56d3bf0b2aa0aa3638bbbefa275176c5567a5d52 100644 (file)
@@ -1,3 +1,6 @@
+9 August 2011: Wouter
+       - patch from Tom Hendrikx fixes load of python modules.
+
 8 August 2011: Wouter
        - make clean had ldns-src reference, removed.
 
index d253cd274131ce673bab34b7dcadbf1e32b51ece..a0d1cf7686d85dcf99379694789cefd847b456f1 100644 (file)
@@ -153,6 +153,8 @@ int pythonmod_init(struct module_env* env, int id)
    }
    PyRun_SimpleString("sys.path.append('"RUN_DIR"') \n");
    PyRun_SimpleString("sys.path.append('"SHARE_DIR"') \n");
+   PyRun_SimpleString("import sysconfig \n");
+   PyRun_SimpleString("sys.path.append(sysconfig.get_path('purelib')) \n");
    if (PyRun_SimpleString("from unboundmodule import *\n") < 0)
    {
       log_err("pythonmod: cannot initialize core module: unboundmodule.py");