From 912ba54394107b16865501e8f02f424accc2da80 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 3 Feb 2008 09:58:02 +0000 Subject: [PATCH] Backport r60537: have order of CPPFLAGS and LDFLAGS be honored. --- Misc/NEWS | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index d83b9cf49c..5f28bd3b05 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -260,6 +260,9 @@ Documentation Build ----- +- Have the search path for building extensions follow the declared order in + $CPPFLAGS and $LDFLAGS. + - Bug #1234: Fixed semaphore errors on AIX 5.2 - Bug #1699: Define _BSD_SOURCE only on OpenBSD. diff --git a/setup.py b/setup.py index 99ad7e3c26..22fc2b1e5c 100644 --- a/setup.py +++ b/setup.py @@ -277,7 +277,7 @@ class PyBuildExt(build_ext): parser.add_option(arg_name, dest="dirs", action="append") options = parser.parse_args(env_val.split())[0] if options.dirs: - for directory in options.dirs: + for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr': -- 2.50.1