[asterisk-commits] russell: branch russell/bindings r103280 - /team/russell/bindings/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Feb 10 17:17:17 CST 2008


Author: russell
Date: Sun Feb 10 17:17:16 2008
New Revision: 103280

URL: http://svn.digium.com/view/asterisk?view=rev&rev=103280
Log:
Add the place where the asterisk python modules get installed to the python path

Modified:
    team/russell/bindings/res/res_python.c

Modified: team/russell/bindings/res/res_python.c
URL: http://svn.digium.com/view/asterisk/team/russell/bindings/res/res_python.c?view=diff&rev=103280&r1=103279&r2=103280
==============================================================================
--- team/russell/bindings/res/res_python.c (original)
+++ team/russell/bindings/res/res_python.c Sun Feb 10 17:17:16 2008
@@ -37,6 +37,7 @@
 #include "asterisk/config.h"
 #include "asterisk/astobj2.h"
 #include "asterisk/cli.h"
+#include "asterisk/paths.h"
 
 #include "res_python/res_python.h"
 
@@ -106,6 +107,12 @@
 
 static int load_module(void)
 {
+	char path[PATH_MAX];
+
+	snprintf(path, sizeof(path), "%s/python", ast_config_AST_DATA_DIR);
+	/* Is there a better way to do this?  If so, I don't know it ... */
+	setenv("PYTHONPATH", path, 0);
+
 #ifdef __Darwin__ /* XXX Fix this check */
 	Py_Initialize();
 #else




More information about the asterisk-commits mailing list