out own Py_GetPath() function to replace pythons, so we can bundle python modules with blender, #if 0'd for now but having it is useful for testing.

This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.
This commit is contained in:
2009-07-02 12:11:20 +00:00
parent d44b341be6
commit aefa7b626a

View File

@@ -37,7 +37,7 @@
#include "BPY_extern.h"
#include "../generic/bpy_internal_import.h" // our own imports
/* external util modukes */
/* external util modules */
#include "../generic/Mathutils.h"
#include "../generic/Geometry.h"
@@ -132,6 +132,21 @@ static PyObject *CreateGlobalDictionary( bContext *C )
return dict;
}
/* Use this so we can include our own python bundle */
#if 0
wchar_t* Py_GetPath(void)
{
int i;
static wchar_t py_path[FILE_MAXDIR] = L"";
char *dirname= BLI_gethome_folder("python");
if(dirname) {
i= mbstowcs(py_path, dirname, FILE_MAXDIR);
printf("py path %s, %d\n", dirname, i);
}
return py_path;
}
#endif
void BPY_start_python( int argc, char **argv )
{
PyThreadState *py_tstate = NULL;