* Added command line tool example similar to 'sopranocmd'
[kdebindings.git] / python / krosspython / pythonconfig.h
blob1cd1c1a8e6017ecec3def71b95713778d068c439
1 /***************************************************************************
2 * pythonconfig.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
20 #ifndef KROSS_PYTHON_CONFIG_H
21 #define KROSS_PYTHON_CONFIG_H
23 // Prevent warnings
24 #if defined(_XOPEN_SOURCE)
25 #undef _XOPEN_SOURCE
26 #endif
27 #if defined(_POSIX_C_SOURCE)
28 #undef _POSIX_C_SOURCE
29 #endif
31 /* Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
32 See also http://bugs.kde.org/show_bug.cgi?id=156950 */
33 #if defined(__sun) || defined(sun)
34 #if defined(_XPG4)
35 #undef _XPG4
36 #endif
37 #endif
39 // The Python.h needs to be included first.
40 #include <Python.h>
41 #include <object.h>
42 #include <compile.h>
43 #include <eval.h>
44 #include <frameobject.h>
46 #include <kross/core/krossconfig.h>
48 // Include the PyCXX stuff.
49 #include "cxx/Config.hxx"
50 #include "cxx/Objects.hxx"
51 #include "cxx/Extensions.hxx"
52 #include "cxx/Exception.hxx"
54 // The version of this python plugin. This will be exported
55 // to the scripting code. That way we're able to write
56 // scripting code for different incompatible Kross python
57 // bindings by checking the version. You should increment
58 // this number only if you really know what you're doing.
59 //#define KROSS_PYTHON_VERSION 1
61 // Enable debugging for Kross::PythonInterpreter
62 //#define KROSS_PYTHON_INTERPRETER_DEBUG
64 // Enable debugging for Kross::PythonScript
65 #define KROSS_PYTHON_SCRIPT_CTOR_DEBUG
66 #define KROSS_PYTHON_SCRIPT_DTOR_DEBUG
67 //#define KROSS_PYTHON_SCRIPT_INIT_DEBUG
68 //#define KROSS_PYTHON_SCRIPT_FINALIZE_DEBUG
69 #define KROSS_PYTHON_SCRIPT_EXEC_DEBUG
70 //#define KROSS_PYTHON_SCRIPT_CALLFUNC_DEBUG
71 #define KROSS_PYTHON_SCRIPT_AUTOCONNECT_DEBUG
73 // Enable debugging for Kross::PythonModule
74 //#define KROSS_PYTHON_MODULE_CTORDTOR_DEBUG
75 //#define KROSS_PYTHON_MODULE_IMPORT_DEBUG
77 // Enable debugging for Kross::PythonExtension
78 //#define KROSS_PYTHON_EXTENSION_CTORDTOR_DEBUG
79 //#define KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG
80 //#define KROSS_PYTHON_EXTENSION_GETATTR_DEBUG
81 //#define KROSS_PYTHON_EXTENSION_SETATTR_DEBUG
82 //#define KROSS_PYTHON_EXTENSION_CALL_DEBUG
83 //#define KROSS_PYTHON_EXTENSION_CONNECT_DEBUG
84 //#define KROSS_PYTHON_EXTENSION_NUMERIC_DEBUG
86 // Enable debugging for Kross::Function
87 //#define KROSS_PYTHON_FUNCTION_DEBUG
89 // Enable debugging for Kross::PythonType and Kross::PythonMetaTypeFactory
90 //#define KROSS_PYTHON_VARIANT_DEBUG
92 #define KROSS_PYTHON_EXCEPTION_DEBUG
94 #endif