From be37790f449641a6ead3af2d2334cc544789e869 Mon Sep 17 00:00:00 2001 From: Eric Firing Date: Thu, 28 Nov 2013 10:08:10 -1000 Subject: [PATCH] setupext: put pkg-config -I, -L, -l locations at the head of the list The assumption here is that we want the pkg-config info to take precedence, so its -I and -L output should be prepended, not appended to the lists used to construct the compiler and linker commands. It is less clear whether the -l info also should be prepended, as it is in the changeset; ideally, it wouldn't matter, but for some compilers, it might. If so, -l can be handled separately from -I and -L. --- setupext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setupext.py b/setupext.py index 1198bd0ab854..5258c40e4338 100644 --- a/setupext.py +++ b/setupext.py @@ -289,7 +289,7 @@ def setup_extension(self, ext, package, default_include_dirs=[], for token in output.split(): attr = flag_map.get(token[:2]) if attr is not None: - getattr(ext, attr).append(token[2:]) + getattr(ext, attr).insert(0, token[2:]) if use_defaults: basedirs = get_base_dirs()