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>
This commit is contained in:
Gianni Tedesco committed 2010-09-16 17:20:22 +01:00
1 parent 7c12b60534
commit 6d4ba52d49
5 files changed
+924 -3

No files matched your search

+17 -2
View File
@@ -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':
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.