Files
xen/tools/python/setup.py
T
Konrad Rzeszutek Wilk 7d3c16b4e9 tools: fix python install with "xentoollog"
commit 5d3dc86715
"tools: Refactor "xentoollog" into its own library"
with older python versions (2.6.4) will fail to
the build if attempted to be done twice (which
happens due to pygrub dependencies).

make -C python DESTDIR=/tmp
make -C python DESTDIR=/tmp

The second one will fail with:
error: -Wl, -rpath-link=../../tools/libs/toollog: No such file or directory

even though the directory is there (with the libs).

Andrew pointed out that the linker additions should be in
the "extra_link_args" rather than "depends".

And true enough - with that modification it builds.

CC: Ian Campbell <ian.campbell@citrix.com>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Suggested-by: Andrew Cooper <andrew.cooper3@citirx.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- typo in commit message ]
2016-01-15 10:10:24 +00:00

45 lines
1.7 KiB
Python

from distutils.core import setup, Extension
import os, sys
XEN_ROOT = "../.."
extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]
PATH_XEN = XEN_ROOT + "/tools/include"
PATH_LIBXENTOOLLOG = XEN_ROOT + "/tools/libs/toollog"
PATH_LIBXC = XEN_ROOT + "/tools/libxc"
PATH_LIBXL = XEN_ROOT + "/tools/libxl"
PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
xc = Extension("xc",
extra_compile_args = extra_compile_args,
include_dirs = [ PATH_XEN, PATH_LIBXENTOOLLOG + "/include", PATH_LIBXC + "/include", "xen/lowlevel/xc" ],
library_dirs = [ PATH_LIBXC ],
libraries = [ "xenctrl", "xenguest" ],
depends = [ PATH_LIBXC + "/libxenctrl.so", PATH_LIBXC + "/libxenguest.so" ],
extra_link_args = [ "-Wl,-rpath-link="+PATH_LIBXENTOOLLOG ],
sources = [ "xen/lowlevel/xc/xc.c" ])
xs = Extension("xs",
extra_compile_args = extra_compile_args,
include_dirs = [ PATH_XEN, PATH_XENSTORE + "/include", "xen/lowlevel/xs" ],
library_dirs = [ PATH_XENSTORE ],
libraries = [ "xenstore" ],
depends = [ PATH_XENSTORE + "/libxenstore.so" ],
sources = [ "xen/lowlevel/xs/xs.c" ])
plat = os.uname()[0]
modules = [ xc, xs ]
setup(name = 'xen',
version = '3.0',
description = 'Xen',
packages = ['xen',
'xen.migration',
'xen.lowlevel',
],
ext_package = "xen.lowlevel",
ext_modules = modules
)