From: Brett Cannon Date: Sun, 2 Jan 2005 21:54:07 +0000 (+0000) Subject: Since it is a possibility that LDFLAGS or CPPFLAGS were set with options that X-Git-Tag: v2.5a0~2189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44837719ef2886da0671aed55e99cdae14d24b9d;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/setup.py b/setup.py index c8d9aa0b344c..0f7b0b916dc8 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,