changeset: 104153:520ca3652422 branch: 2.7 parent: 104149:54f062aa2a11 user: Benjamin Peterson date: Wed Sep 28 23:13:58 2016 -0700 files: Lib/distutils/command/build_ext.py Lib/distutils/tests/test_build_ext.py Misc/NEWS description: build_ext: correctly parse the link_objects user option (closes #1703178) Patch by Valerie Lambert. diff -r 54f062aa2a11 -r 520ca3652422 Lib/distutils/command/build_ext.py --- a/Lib/distutils/command/build_ext.py Thu Sep 29 02:50:20 2016 +0000 +++ b/Lib/distutils/command/build_ext.py Wed Sep 28 23:13:58 2016 -0700 @@ -161,6 +161,7 @@ self.include_dirs.append(plat_py_include) self.ensure_string_list('libraries') + self.ensure_string_list('link_objects') # Life is easier if we're not forever checking for None, so # simplify these options to empty lists if unset diff -r 54f062aa2a11 -r 520ca3652422 Lib/distutils/tests/test_build_ext.py --- a/Lib/distutils/tests/test_build_ext.py Thu Sep 29 02:50:20 2016 +0000 +++ b/Lib/distutils/tests/test_build_ext.py Wed Sep 28 23:13:58 2016 -0700 @@ -168,6 +168,13 @@ cmd.finalize_options() self.assertEqual(cmd.rpath, ['one', 'two']) + # make sure cmd.link_objects is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.link_objects = 'one two,three' + cmd.finalize_options() + self.assertEqual(cmd.link_objects, ['one', 'two', 'three']) + # XXX more tests to perform for win32 # make sure define is turned into 2-tuples diff -r 54f062aa2a11 -r 520ca3652422 Misc/NEWS --- a/Misc/NEWS Thu Sep 29 02:50:20 2016 +0000 +++ b/Misc/NEWS Wed Sep 28 23:13:58 2016 -0700 @@ -42,6 +42,9 @@ Library ------- +- Issue #1703178: Fix the ability to pass the --link-objects option to the + distutils build_ext command. + - Issue #28253: Fixed calendar functions for extreme months: 0001-01 and 9999-12.