Build Question: How to Add -Wl,--option Before Objects In Setup.py?

Cyd Haselton chaselton at gmail.com
Mon Oct 27 11:54:46 EDT 2014


I need to add a linker option to the command(s) run by setup.py when
building various objects.  I'm not familiar with Python at all, so I
basically copied and modified a line from one area of the script to
another


ext_modules=[Extension('_struct', ['_struct.c'], extra_link_args =
['Wl,--allow-shlib-undefined'])],
                     *snip*

Unfortunately this seems to append the option to the end of the
command line.  What's the best (fastest) way to add it before the
object being built (objectname.o)?



More information about the Python-list mailing list