From 44837719ef2886da0671aed55e99cdae14d24b9d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 2 Jan 2005 21:54:07 +0000 Subject: [PATCH] Since it is a possibility that LDFLAGS or CPPFLAGS were set with options that in no way affect library or include directories the code must take that into account and not assume some options were found. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c8d9aa0b344..0f7b0b916dc 100644 --- a/setup.py +++ b/setup.py @@ -270,8 +270,9 @@ class PyBuildExt(build_ext): parser.error = lambda msg: None parser.add_option(arg_name, dest="dirs", action="append") options = parser.parse_args(env_val.split())[0] - for directory in options.dirs: - add_dir_to_list(dir_list, directory) + if options.dirs: + for directory in options.dirs: + add_dir_to_list(dir_list, directory) if os.path.normpath(sys.prefix) != '/usr': add_dir_to_list(self.compiler.library_dirs,