aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/setup.py
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/setup.py
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/setup.py')
-rw-r--r--tools/python/setup.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/python/setup.py b/tools/python/setup.py
index 689188e4e6..fc8330e252 100644
--- a/tools/python/setup.py
+++ b/tools/python/setup.py
@@ -9,14 +9,23 @@ extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]
include_dirs = [ XEN_ROOT + "/tools/libxc",
XEN_ROOT + "/tools/xenstore",
XEN_ROOT + "/tools/include",
+ XEN_ROOT + "/tools/libxl",
]
library_dirs = [ XEN_ROOT + "/tools/libxc",
XEN_ROOT + "/tools/xenstore",
+ XEN_ROOT + "/tools/libxl",
+ XEN_ROOT + "/tools/blktap2/control",
]
libraries = [ "xenctrl", "xenguest", "xenstore" ]
+plat = os.uname()[0]
+if plat == 'Linux':
+ uuid_libs = ["uuid"]
+else:
+ uuid_libs = []
+
xc = Extension("xc",
extra_compile_args = extra_compile_args,
include_dirs = include_dirs + [ "xen/lowlevel/xc" ],
@@ -83,8 +92,14 @@ netlink = Extension("netlink",
sources = [ "xen/lowlevel/netlink/netlink.c",
"xen/lowlevel/netlink/libnetlink.c"])
-modules = [ xc, xs, ptsname, acm, flask ]
-plat = os.uname()[0]
+xl = Extension("xl",
+ extra_compile_args = extra_compile_args,
+ include_dirs = include_dirs + [ "xen/lowlevel/xl" ],
+ library_dirs = library_dirs,
+ libraries = libraries + ["xenlight", "blktapctl" ] + uuid_libs,
+ sources = [ "xen/lowlevel/xl/xl.c", "xen/lowlevel/xl/_pyxl_types.c" ])
+
+modules = [ xc, xs, ptsname, acm, flask, xl ]
if plat == 'SunOS':
modules.extend([ scf, process ])
if plat == 'Linux':