0

I am using setup tools to build a Python module and I need to add extra links. Parameter extra_link_args is not working.

Ratmil
  • 117
  • 8

1 Answers1

2

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
                   )],
Ratmil
  • 117
  • 8