Hallöchen!
I have a module here that makes a library available to python using SWIG. The setup.py file looks like this:
setup(name = 'my', py_modules = ['mymodule','my'], ext_modules = [Extension('_mymodule', sources = ['mymodule.c', 'mymodule.i'])] )
Unfortunately, SWIG creates not only "_mymodule" but also "mymodule". However, the above script must be called twice, because at the first run, "mymodule" doesn't exist yet. (This is accompanied by error messages, by the way.)
A solution without the necessaty of calling twice and without errors is
setup(name = 'my', py_modules = ['my'], ext_modules = [Extension('_mymodule', sources = ['mymodule.c', 'mymodule.i'])] ) setup(name = 'mymodule', py_modules = ['mymodule'], )
I.e., calling "setup" twice in the same setup.py. But is this really the clean solution for this problem?
Thank you!
Tschö, Torsten Bronger.