[Bf-blender-cvs] [183b643] master: Building without Python works again

Campbell Barton noreply at git.blender.org
Tue May 19 03:40:29 CEST 2015


Commit: 183b6437744f69bbeadf503f791f763f3c7c4a6f
Author: Campbell Barton
Date:   Tue May 19 11:34:52 2015 +1000
Branches: master
https://developer.blender.org/rB183b6437744f69bbeadf503f791f763f3c7c4a6f

Building without Python works again

===================================================================

M	source/blender/blenfont/CMakeLists.txt
M	source/blender/blenfont/SConscript
M	source/blender/blenfont/intern/blf_translation.c
M	source/blender/blenkernel/intern/fcurve.c
M	source/blender/windowmanager/intern/wm_keymap.c

===================================================================

diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 2f10c35..059e2ca 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -29,7 +29,6 @@ set(INC
 	../gpu
 	../makesdna
 	../makesrna
-	../python
 	../imbuf
 	../../../intern/guardedalloc
 	../../../intern/glew-mx
@@ -67,7 +66,13 @@ if(WITH_INTERNATIONAL)
 	add_definitions(-DWITH_INTERNATIONAL)
 endif()
 
+if(WITH_PYTHON)
+	add_definitions(-DWITH_PYTHON)
+	list(APPEND INC
+		../python
+	)
+endif()
+
 add_definitions(${GL_DEFINITIONS})
 
 blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
-
diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript
index b6cf052..61d2ca9 100644
--- a/source/blender/blenfont/SConscript
+++ b/source/blender/blenfont/SConscript
@@ -44,7 +44,6 @@ incs = [
     '../imbuf',
     '../makesdna',
     '../makesrna',
-    '../python',
     ]
 
 incs.extend(Split(env['BF_FREETYPE_INC']))
@@ -57,6 +56,10 @@ if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross':
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
+if env['WITH_BF_PYTHON']:
+    defs.append('WITH_PYTHON')
+    incs.append('../python')
+
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs.append(env['BF_PTHREADS_INC'])
 
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
index 2546486..5d828d9 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -46,7 +46,9 @@
 
 #include "DNA_userdef_types.h" /* For user settings. */
 
+#ifdef WITH_PYTHON
 #include "BPY_extern.h"
+#endif
 
 #ifdef WITH_INTERNATIONAL
 
@@ -152,9 +154,11 @@ const char *BLF_pgettext(const char *msgctxt, const char *msgid)
 		/* We assume if the returned string is the same (memory level) as the msgid, no translation was found,
 		 * and we can try py scripts' ones!
 		 */
+#ifdef WITH_PYTHON
 		if (ret == msgid) {
 			ret = BPY_app_translations_py_pgettext(msgctxt, msgid);
 		}
+#endif
 	}
 
 	return ret;
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 322da9f..6e58513 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -70,7 +70,9 @@
 #define SMALL -1.0e-10
 #define SELECT 1
 
+#ifdef WITH_PYTHON
 static ThreadMutex python_driver_lock = BLI_MUTEX_INITIALIZER;
+#endif
 
 /* ************************** Data-Level Functions ************************* */
 
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index c765587..4517790 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -990,11 +990,13 @@ static wmKeyMapItem *wm_keymap_item_find_handlers(
 										       "this might not be desired!\n", opname);
 										printf("\tkm: '%s', kmi: '%s'\n", keymap->idname, kmi_str);
 #ifndef NDEBUG
+#ifdef WITH_PYTHON
 										printf("OPERATOR\n");
 										IDP_spit(properties);
 										printf("KEYMAP\n");
 										IDP_spit(kmi->ptr->data);
 #endif
+#endif
 										printf("\n");
 									}
 
@@ -1137,11 +1139,13 @@ static wmKeyMapItem *wm_keymap_item_find(
 					       "this might not be desired!\n", opname);
 					printf("\tkm: '%s', kmi: '%s'\n", km->idname, kmi_str);
 #ifndef NDEBUG
+#ifdef WITH_PYTHON
 					printf("OPERATOR\n");
 					IDP_spit(properties);
 					printf("KEYMAP\n");
 					IDP_spit(kmi->ptr->data);
 #endif
+#endif
 					printf("\n");
 				}




More information about the Bf-blender-cvs mailing list