[Bug 348426] Python extensions fail to build with libxul

r=benjamin@smedbergs.us, sr=jst


git-svn-id: svn://10.0.0.236/trunk@213164 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2006-10-05 10:44:03 +00:00
parent 975a3fb3e5
commit d410bbfc5a
13 changed files with 90 additions and 62 deletions

View File

@@ -47,6 +47,7 @@
#include "PyXPCOM_std.h"
#include "nsDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
#include "nsILocalFile.h"
#include "nsITimelineService.h"
@@ -131,7 +132,9 @@ void AddStandardPaths()
Py_XDECREF(newStr);
// And now try and get Python to process this directory as a "site dir"
// - ie, look for .pth files, etc
nsCAutoString cmdBuf(NS_LITERAL_CSTRING("import site;site.addsitedir(r'") + pathCBuf + NS_LITERAL_CSTRING("')\n"));
nsCAutoString cmdBuf(NS_LITERAL_CSTRING("import site;site.addsitedir(r'"));
cmdBuf.Append(pathCBuf);
cmdBuf.Append(NS_LITERAL_CSTRING("')\n"));
if (0 != PyRun_SimpleString((char *)cmdBuf.get())) {
PyXPCOM_LogError("The directory '%s' could not be added as a site directory", pathCBuf.get());
PyErr_Clear();