[Distutils] Re: SWIG: two modules, but only one can be installed

Lars Immisch lars at ibp.de
Mon Feb 21 00:42:11 CET 2005


> Hallöchen!

(I personally prefer "Dear Sirs")

<snippage>

> But mymodule.py doesn't exist as a source file.  Instead, it is
> *created* by SWIG.

Ah. It sounds like it's just the SWIG naming conventions that irritate you.

For mymodule.i, SWIG will generate _mymodule.{so|dll} and mymodule.py 
(containing the shadow wrapper code).

distutils is aware of that naming convention.

Try just:

setup(name = 'my',
        ext_modules = [Extension('mymodule',
                                 sources = ['mymodule.i'])]

and distutils should do the Right Thing (tm).

- Lars


More information about the Distutils-SIG mailing list