Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2010-08-17 00:05:59 +0400
committerJoerg Mueller <nexyon@gmail.com>2010-08-17 00:05:59 +0400
commit26809f38aa3cda6f027ff658e64ca898314e673a (patch)
treec90179c24da81c558abf5497aa33c91890579cd6
parent54de782faffe12e625af6f80a283a45d0fd9c535 (diff)
Audaspace: This should fix all missing python includes now once for all...
-rw-r--r--intern/audaspace/intern/AUD_C-API.cpp1
-rw-r--r--intern/audaspace/intern/AUD_C-API.h11
-rw-r--r--intern/audaspace/intern/AUD_PyInit.h47
-rw-r--r--source/blender/editors/sound/CMakeLists.txt1
-rw-r--r--source/blender/editors/sound/SConscript2
-rw-r--r--source/blender/editors/space_graph/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_graph/SConscript2
-rw-r--r--source/blender/editors/space_sequencer/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_sequencer/SConscript2
-rw-r--r--source/blender/makesrna/intern/SConscript4
-rw-r--r--source/blender/python/intern/bpy.c5
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp2
12 files changed, 51 insertions, 28 deletions
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp
index 304c5657364..ef1cdee5686 100644
--- a/intern/audaspace/intern/AUD_C-API.cpp
+++ b/intern/audaspace/intern/AUD_C-API.cpp
@@ -29,6 +29,7 @@
#endif
#ifndef DISABLE_PYTHON
+#include "AUD_PyInit.h"
#include "AUD_PyAPI.h"
Device* g_device;
diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h
index 56e50bb4b47..4dc074b9288 100644
--- a/intern/audaspace/intern/AUD_C-API.h
+++ b/intern/audaspace/intern/AUD_C-API.h
@@ -26,10 +26,6 @@
#ifndef AUD_CAPI
#define AUD_CAPI
-#ifndef DISABLE_PYTHON
-#include "Python.h"
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -84,13 +80,6 @@ extern int* AUD_enumDevices();
*/
extern void AUD_exit();
-#ifndef DISABLE_PYTHON
-/**
- * Initalizes the Python module.
- */
-extern PyObject* AUD_initPython();
-#endif
-
/**
* Locks the playback device.
*/
diff --git a/intern/audaspace/intern/AUD_PyInit.h b/intern/audaspace/intern/AUD_PyInit.h
new file mode 100644
index 00000000000..bd67259449a
--- /dev/null
+++ b/intern/audaspace/intern/AUD_PyInit.h
@@ -0,0 +1,47 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN LGPL LICENSE BLOCK *****
+ *
+ * Copyright 2010 Jörg Hermann Müller
+ *
+ * This file is part of AudaSpace.
+ *
+ * AudaSpace is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * AudaSpace is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with AudaSpace. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ***** END LGPL LICENSE BLOCK *****
+ */
+
+#ifndef AUD_PYINIT
+#define AUD_PYINIT
+
+#ifndef DISABLE_PYTHON
+#include "Python.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Initalizes the Python module.
+ */
+extern PyObject* AUD_initPython();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+#endif //AUD_PYINIT
diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt
index 391f3a90533..02765726c6e 100644
--- a/source/blender/editors/sound/CMakeLists.txt
+++ b/source/blender/editors/sound/CMakeLists.txt
@@ -30,7 +30,6 @@ SET(INC
../../makesdna
../../makesrna
../../windowmanager
- ${PYTHON_INC}
)
BLENDERLIB(bf_editor_sound "${SRC}" "${INC}")
diff --git a/source/blender/editors/sound/SConscript b/source/blender/editors/sound/SConscript
index a0a8fbf36d0..8010dd49c57 100644
--- a/source/blender/editors/sound/SConscript
+++ b/source/blender/editors/sound/SConscript
@@ -7,8 +7,6 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc'
incs += ' ../../makesrna'
incs += ' #/intern/audaspace/intern'
-if env['WITH_BF_PYTHON']:
- incs += ' ' + env['BF_PYTHON_INC']
defs = []
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index e511c8e963c..6ad95d920c6 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -30,7 +30,6 @@ SET(INC
../../makesrna
../../windowmanager
../../../../intern/audaspace/intern
- ${PYTHON_INC}
)
BLENDERLIB(bf_editor_space_graph "${SRC}" "${INC}")
diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript
index 438a70f4ba5..174894ddfad 100644
--- a/source/blender/editors/space_graph/SConscript
+++ b/source/blender/editors/space_graph/SConscript
@@ -6,7 +6,5 @@ sources = env.Glob('*.c')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' #/intern/audaspace/intern'
-if env['WITH_BF_PYTHON']:
- incs += ' ' + env['BF_PYTHON_INC']
env.BlenderLib ( 'bf_editors_space_graph', sources, Split(incs), [], libtype=['core'], priority=[50] )
diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt
index d776ea5d796..383cc05b7f7 100644
--- a/source/blender/editors/space_sequencer/CMakeLists.txt
+++ b/source/blender/editors/space_sequencer/CMakeLists.txt
@@ -31,7 +31,6 @@ SET(INC
../../makesrna
../../windowmanager
../../../../intern/audaspace/intern
- ${PYTHON_INC}
)
BLENDERLIB(bf_editor_space_sequencer "${SRC}" "${INC}")
diff --git a/source/blender/editors/space_sequencer/SConscript b/source/blender/editors/space_sequencer/SConscript
index 7731743aaab..7a3fb6982ef 100644
--- a/source/blender/editors/space_sequencer/SConscript
+++ b/source/blender/editors/space_sequencer/SConscript
@@ -7,7 +7,5 @@ incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../makesrna'
incs += ' #/intern/audaspace/intern'
-if env['WITH_BF_PYTHON']:
- incs += ' ' + env['BF_PYTHON_INC']
env.BlenderLib ( 'bf_editors_space_sequencer', sources, Split(incs), [], libtype=['core'], priority=[100] )
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index d1a7eeb82e6..fec4b1e693d 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -85,9 +85,7 @@ if env['WITH_BF_JACK']:
if env['BF_UNIT_TEST']:
defs.append('UNIT_TEST')
-if env['WITH_BF_PYTHON']:
- incs += ' ' + env['BF_PYTHON_INC']
-else:
+if not env['WITH_BF_PYTHON']:
defs.append('DISABLE_PYTHON')
if env['OURPLATFORM'] == 'linux2':
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index e107509d844..03c1a012575 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -41,10 +41,7 @@
#include "../generic/blf_api.h"
#include "../generic/IDProp.h"
-#ifndef DISABLE_PYTHON
-#define WITH_PYTHON
-#endif
-#include "AUD_C-API.h"
+#include "AUD_PyInit.h"
static char bpy_script_paths_doc[] =
".. function:: script_paths()\n"
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 303890fd630..3785f715803 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -47,7 +47,7 @@ extern "C" {
}
#define WITH_PYTHON
-#include "AUD_C-API.h"
+#include "AUD_PyInit.h"
#endif