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.
This commit is contained in:
Brett Cannon 2005-01-02 21:54:07 +00:00
parent c34f8673a1
commit 44837719ef
1 changed files with 3 additions and 2 deletions

View File

@ -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,