mirror of https://github.com/python/cpython
build_ext: correctly parse the link_objects user option (closes #1703178)
Patch by Valerie Lambert.
This commit is contained in:
parent
c49b4d8ef3
commit
4254e8c548
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue