aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/python/setup.py')
-rw-r--r--tools/python/setup.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/tools/python/setup.py b/tools/python/setup.py
new file mode 100644
index 0000000000..b0eb3f2ebd
--- /dev/null
+++ b/tools/python/setup.py
@@ -0,0 +1,48 @@
+
+from distutils.core import setup, Extension
+
+XEN_ROOT = "../.."
+
+extra_compile_args = ["-fno-strict-aliasing"]
+
+
+include_dirs = [ XEN_ROOT + "/xen/include/hypervisor-ifs",
+ XEN_ROOT + "/linux-xen-sparse/include",
+ XEN_ROOT + "/tools/python/xen/ext/xu",
+ XEN_ROOT + "/tools/libxc",
+ XEN_ROOT + "/tools/libxutil",
+ ]
+
+library_dirs = [ XEN_ROOT + "/tools/libxc",
+ XEN_ROOT + "/tools/libxutil",
+ ]
+
+libraries = [ "xc", "xutil" ]
+
+xc = Extension("xc",
+ extra_compile_args = extra_compile_args,
+ include_dirs = include_dirs + [ "xen/ext/xc" ],
+ library_dirs = library_dirs,
+ libraries = libraries,
+ sources = [ "xen/ext/xc/xc.c" ])
+
+xu = Extension("xu",
+ extra_compile_args = extra_compile_args,
+ include_dirs = include_dirs + [ "xen/ext/xu" ],
+ library_dirs = library_dirs,
+ libraries = libraries,
+ sources = [ "xen/ext/xu/xu.c" ])
+
+setup(name = 'xen',
+ version = '2.0',
+ description = 'Xen',
+ packages = ['xen',
+ 'xen.ext',
+ 'xen.util',
+ 'xen.xend',
+ 'xen.xend.server',
+ 'xen.xm',
+ ],
+ ext_package = "xen.ext",
+ ext_modules = [ xc, xu ]
+ )