summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/distutils/command/build_ext.py1
-rw-r--r--Lib/distutils/tests/test_build_ext.py7
-rw-r--r--Misc/NEWS3
3 files changed, 11 insertions, 0 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index f03a4e31d8..7c278ef0af 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -166,6 +166,7 @@ class build_ext(Command):
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 --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 4e397ea4c9..f3df564e37 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -195,6 +195,13 @@ class BuildExtTestCase(TempdirManager,
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 --git a/Misc/NEWS b/Misc/NEWS
index 3b41f49a45..fbf3100481 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -83,6 +83,9 @@ Core and Builtins
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.