Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8014e6

Browse files
committed
In 'check_extensions_list()': when converting old-style 'buildinfo' dict,
don't assign None to any attributes of the Extension object.
1 parent f5e96fa commit d8014e6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/distutils/command/build_ext.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def check_extensions_list (self, extensions):
278278
'extra_objects',
279279
'extra_compile_args',
280280
'extra_link_args'):
281-
setattr(ext, key, build_info.get(key))
281+
val = build_info.get(key)
282+
if val is not None:
283+
setattr(ext, key, val)
282284

283285
# Medium-easy stuff: same syntax/semantics, different names.
284286
ext.runtime_library_dirs = build_info.get('rpath')

0 commit comments

Comments
 (0)