diff options
Diffstat (limited to 'recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch')
-rw-r--r-- | recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch | 88 |
1 files changed, 41 insertions, 47 deletions
diff --git a/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch b/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch index 0aa3bde2..16321db5 100644 --- a/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch +++ b/recipes-extended/libvirt/libvirt/libvirt_api_xml_path.patch | |||
@@ -14,41 +14,26 @@ Signed-off-by: Martin Kletzander <mkletzan redhat com> | |||
14 | setup.py | 25 ++++++++++++++++++++++--- | 14 | setup.py | 25 ++++++++++++++++++++++--- |
15 | 1 file changed, 22 insertions(+), 3 deletions(-) | 15 | 1 file changed, 22 insertions(+), 3 deletions(-) |
16 | 16 | ||
17 | Index: libvirt-python-1.2.1/setup.py | 17 | Index: libvirt-python-1.2.4/setup.py |
18 | =================================================================== | 18 | =================================================================== |
19 | --- libvirt-python-1.2.1.orig/setup.py | 19 | --- libvirt-python-1.2.4.orig/setup.py |
20 | +++ libvirt-python-1.2.1/setup.py | 20 | +++ libvirt-python-1.2.4/setup.py |
21 | @@ -30,18 +30,19 @@ | 21 | @@ -40,13 +40,7 @@ |
22 | if pkgcfg is None: | 22 | "libvirt"]) |
23 | raise Exception("pkg-config binary is required to compile libvirt-python") | ||
24 | 23 | ||
25 | -spawn([pkgcfg, | 24 | def have_libvirt_lxc(): |
26 | - "--print-errors", | 25 | - try: |
27 | - "--atleast-version=%s" % MIN_LIBVIRT, | 26 | - spawn([get_pkgcfg(), |
28 | - "libvirt"]) | 27 | - "--atleast-version=%s" % MIN_LIBVIRT_LXC, |
29 | +# spawn([pkgcfg, | 28 | - "libvirt"]) |
30 | +# "--print-errors", | 29 | - return True |
31 | +# "--atleast-version=%s" % MIN_LIBVIRT, | 30 | - except DistutilsExecError: |
32 | +# "libvirt"]) | 31 | - return False |
33 | 32 | + return True | |
34 | have_libvirt_lxc=True | ||
35 | -try: | ||
36 | - spawn([pkgcfg, | ||
37 | - "--atleast-version=%s" % MIN_LIBVIRT_LXC, | ||
38 | - "libvirt"]) | ||
39 | -except DistutilsExecError: | ||
40 | - have_libvirt_lxc=False | ||
41 | +# try: | ||
42 | +# spawn([pkgcfg, | ||
43 | +# "--atleast-version=%s" % MIN_LIBVIRT_LXC, | ||
44 | +# "libvirt"]) | ||
45 | +# except DistutilsExecError: | ||
46 | +# have_libvirt_lxc=False | ||
47 | +have_libvirt_lxc=True | ||
48 | 33 | ||
49 | def get_pkgconfig_data(args, mod, required=True): | 34 | def get_pkgconfig_data(args, mod, required=True): |
50 | """Run pkg-config to and return content associated with it""" | 35 | """Run pkg-config to and return content associated with it""" |
51 | @@ -63,7 +64,17 @@ | 36 | @@ -68,7 +62,17 @@ |
52 | """Check with pkg-config that libvirt is present and extract | 37 | """Check with pkg-config that libvirt is present and extract |
53 | the API XML file paths we need from it""" | 38 | the API XML file paths we need from it""" |
54 | 39 | ||
@@ -67,23 +52,32 @@ Index: libvirt-python-1.2.1/setup.py | |||
67 | 52 | ||
68 | offset = libvirt_api.index("-api.xml") | 53 | offset = libvirt_api.index("-api.xml") |
69 | libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml" | 54 | libvirt_qemu_api = libvirt_api[0:offset] + "-qemu-api.xml" |
70 | @@ -73,8 +84,17 @@ | 55 | @@ -88,8 +92,17 @@ |
71 | |||
72 | return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api) | ||
73 | 56 | ||
74 | -ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) | 57 | c_modules = [] |
75 | -cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) | 58 | py_modules = [] |
76 | +libvirt_cflags = os.getenv("LIBVIRT_CFLAGS") | 59 | - ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) |
77 | +if libvirt_cflags: | 60 | - cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) |
78 | + cflags = libvirt_cflags | 61 | + libvirt_cflags = os.getenv("LIBVIRT_CFLAGS") |
79 | +else: | 62 | + if libvirt_cflags: |
80 | + cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) | 63 | + cflags = libvirt_cflags |
64 | + else: | ||
65 | + cflags = get_pkgconfig_data(["--cflags"], "libvirt", False) | ||
81 | + | 66 | + |
82 | +libvirt_libs = os.getenv("LIBVIRT_LIBS") | 67 | + libvirt_libs = os.getenv("LIBVIRT_LIBS") |
83 | +if libvirt_libs: | 68 | + if libvirt_libs: |
84 | + ldflags = libvirt_libs | 69 | + ldflags = libvirt_libs |
85 | +else: | 70 | + else: |
86 | + ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) | 71 | + ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False) |
72 | |||
73 | module = Extension('libvirtmod', | ||
74 | sources = ['libvirt-override.c', 'build/libvirt.c', 'typewrappers.c', 'libvirt-utils.c'], | ||
75 | @@ -138,7 +151,7 @@ | ||
76 | class my_build(build): | ||
77 | |||
78 | def run(self): | ||
79 | - check_minimum_libvirt_version() | ||
80 | +# check_minimum_libvirt_version() | ||
81 | apis = get_api_xml_files() | ||
87 | 82 | ||
88 | c_modules = [] | 83 | self.spawn([sys.executable, "generator.py", "libvirt", apis[0]]) |
89 | py_modules = [] | ||