[libvirt] [python PATCH] setup: Use cflags and ldflags properly

Jiri Denemark jdenemar at redhat.com
Mon Jan 18 14:05:14 UTC 2016


The setup.py script reads cflags and ldflags from pkg-config and uses
them when compiling/linking C modules. Since both cflags and ldflags may
include multiple compiler arguments we need to split them rather than
concatenating them into a single argument.

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
 setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 9bf583b..6994e75 100755
--- a/setup.py
+++ b/setup.py
@@ -96,9 +96,9 @@ def get_module_lists():
                        libraries = [ "virt" ],
                        include_dirs = [ "." ])
     if cflags != "":
-        module.extra_compile_args.append(cflags)
+        module.extra_compile_args.extend(cflags.split())
     if ldflags != "":
-        module.extra_link_args.append(ldflags)
+        module.extra_link_args.extend(ldflags.split())
 
     c_modules.append(module)
     py_modules.append("libvirt")
-- 
2.7.0




More information about the libvir-list mailing list