summaryrefslogtreecommitdiff
path: root/cpp/bindings/qmf/python
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-06-01 21:24:14 +0000
committerTed Ross <tross@apache.org>2009-06-01 21:24:14 +0000
commitd30c482b6a5070c5fcd97291c901ddcde77f351f (patch)
tree6b7a5f8aad9e10238aea053932c47b3981f1ebd6 /cpp/bindings/qmf/python
parent7f280d95d1bc92a8534d589b537b8e90e913099c (diff)
downloadqpid-python-d30c482b6a5070c5fcd97291c901ddcde77f351f.tar.gz
QPID-1874 - Patch from Ian Main
This patch provides the Ruby binding for QMF Agent and the framework for the Python bindings. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@780837 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qmf/python')
-rw-r--r--cpp/bindings/qmf/python/Makefile.am29
-rw-r--r--cpp/bindings/qmf/python/python.i16
2 files changed, 45 insertions, 0 deletions
diff --git a/cpp/bindings/qmf/python/Makefile.am b/cpp/bindings/qmf/python/Makefile.am
new file mode 100644
index 0000000000..57f960b9f9
--- /dev/null
+++ b/cpp/bindings/qmf/python/Makefile.am
@@ -0,0 +1,29 @@
+
+if HAVE_PYTHON_DEVEL
+
+INCLUDES = -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_srcdir)/src/gen
+
+EXTRA_DIST = python.i
+
+generated_file_list = \
+ qmfengine.cpp \
+ qmfengine.py
+
+$(generated_file_list): python.i ../qmfengine.i
+ swig -python -c++ -Wall -I/usr/include $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -o qmfengine.cpp python.i
+
+AM_CPPFLAGS = $(QPID_CXXFLAGS) $(INCLUDES) -I$(srcdir)/qmf -I$(PYTHON_INC)
+AM_CXXFLAGS = $(QPID_CXXFLAGS)
+
+pylibdir = $(PYTHON_LIB)
+
+lib_LTLIBRARIES = _qmfengine.la
+
+_qmfengine_la_LDFLAGS = -avoid-version -module -shrext "$(PYTHON_SO)"
+_qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(QPID_SRC)/.libs -lqpidclient $(top_srcdir)/src/libqmfcommon.la $(top_srcdir)/src/libqmfagent.la
+
+_qmfengine_la_SOURCES = \
+ qmfengine.cpp
+
+endif # HAVE_PYTHON_DEVEL
+
diff --git a/cpp/bindings/qmf/python/python.i b/cpp/bindings/qmf/python/python.i
new file mode 100644
index 0000000000..4ead28ab89
--- /dev/null
+++ b/cpp/bindings/qmf/python/python.i
@@ -0,0 +1,16 @@
+%module qmfengine
+
+// These are probably wrong.. just to get it to compile for now.
+%typemap (in) void *
+{
+ $1 = (void *) $input;
+}
+
+%typemap (out) void *
+{
+ $result = (PyObject *) $1;
+}
+
+
+%include "../qmfengine.i"
+