diff options
-rw-r--r-- | source/blender/windowmanager/SConscript | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript index c4a6cba90b2..a160d13a64f 100644 --- a/source/blender/windowmanager/SConscript +++ b/source/blender/windowmanager/SConscript @@ -13,4 +13,10 @@ incs += ' ../makesrna ../gpu' incs += ' #/intern/guardedalloc #/intern/memutil #/intern/ghost #/intern/bmfont' incs += ' #/intern/elbeem #/extern/glew/include' -env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), [], libtype=['core'], priority=[5] ) + +defs = [] + +if not env['WITH_BF_PYTHON']: + defs.append('DISABLE_PYTHON') + +env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defs, libtype=['core'], priority=[5] ) diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 274595cc2f1..0bf0a89fd7a 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -211,7 +211,9 @@ void WM_exit(bContext *C) /* before free_blender so py's gc happens while library still exists */ /* needed at least for a rare sigsegv that can happen in pydrivers */ +#ifndef DISABLE_PYTHON BPY_end_python(); +#endif // fastshade_free_render(); /* shaded view */ free_blender(); /* blender.c, does entire library */ |