aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/Makefile
diff options
context:
space:
mode:
authorGianni Tedesco <gianni.tedesco@citrix.com>2010-09-16 17:20:22 +0100
committerGianni Tedesco <gianni.tedesco@citrix.com>2010-09-16 17:20:22 +0100
commit6d4ba52d4915e16aa8cba141cdf287688a92ec1d (patch)
tree6eb39bbde11421fe134fdebfe176591c9349703c /tools/python/Makefile
parent7c12b60534f8192967ede71f70d8ea52741f3270 (diff)
downloadxen-6d4ba52d4915e16aa8cba141cdf287688a92ec1d.tar.gz
xen-6d4ba52d4915e16aa8cba141cdf287688a92ec1d.tar.bz2
xen-6d4ba52d4915e16aa8cba141cdf287688a92ec1d.zip
libxl, tools/python: Add libxl python binding
Introduce python binding for libxl. The binding is not yet complete but serveral methods are implemented and tested. Those which are implemented provide examples of the two or three basic patterns that most future methods should follow. Over 5,000 lines of boilerplate is automatically generated to wrap and export all relevant libxl structure definitions. There are a few places where such code cannot be fully auto-generated and special hooks are declared and stubbed where, for example, conversion between libxl_file_reference and a python file object is required. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/python/Makefile')
-rw-r--r--tools/python/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/python/Makefile b/tools/python/Makefile
index 7dfc45948d..ee7e62564c 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -19,7 +19,12 @@ genpath-target = $(call buildmakevars2file,$(XENPATH))
$(eval $(genpath-target))
.PHONY: build buildpy
-buildpy: genpath
+buildpy: genpath genwrap.py $(XEN_ROOT)/tools/libxl/libxl.idl \
+ $(XEN_ROOT)/tools/libxl/libxltypes.py
+ PYTHONPATH=$(XEN_ROOT)/tools/libxl $(PYTHON) genwrap.py \
+ $(XEN_ROOT)/tools/libxl/libxl.idl \
+ xen/lowlevel/xl/_pyxl_types.h \
+ xen/lowlevel/xl/_pyxl_types.c
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build
build: buildpy refresh-pot refresh-po $(CATALOGS)
@@ -85,6 +90,8 @@ test:
clean:
rm -f $(XENPATH)
rm -rf build *.pyc *.pyo *.o *.a *~ $(CATALOGS) xen/util/auxbin.pyc
+ rm -f xen/lowlevel/xl/_pyxl_types.h
+ rm -f xen/lowlevel/xl/_pyxl_types.c
rm -f $(DEPS)
-include $(DEPS)