How To Set Extra Link Argument In Python Module Setup?
I am using setup tools to build a Python module and I need to add extra links. Parameter extra_link_args is not working.
Solution 1:
As I said, extra_link_args is not an argument to setup. It would be like this:
extra_link_args = []
if platform.system() == 'Darwin':
extra_link_args.append('-Wl,-rpath,' + lib_path)
setup(
name='Mymodule',
#extra_link_args = extra_link_args this is wrong
ext_modules = [Extension("_mymodule", ["mycfile.c"],
depends=[],
libraries = [':mylib.a'],
extra_link_args = extra_link_args, #this is right
)],
Post a Comment for "How To Set Extra Link Argument In Python Module Setup?"