[SciPy-user] [Nipy-devel] how to wrap C++

Robert Kern robert.kern at gmail.com
Sat Jan 27 16:32:18 CST 2007

Stefan van der Walt wrote:
> On Sat, Jan 27, 2007 at 01:39:50AM -0700, Travis Oliphant wrote:
>> It still depends a little.  A large library is probably more easily 
>> handled with SWIG, but for custom interfaces I would say ctypes is best. 
>> The only problems with ctypes are
>> 1) Not easy to distribute the source code with the interface as you 
>> can't use distutils out of the box for building shared libraries.
> I've heard this being said many times, but I'm not sure I understand.
> I've built shared libraries under Linux, and I've seen people do it
> under Windows.  Is there a problem under MacOSX or Solaris platforms?

Actually, let me back up. With ctypes, we want the .so/.dll to go into the
package rather than being installed anywhere. You still have to extend distutils
do a build of a non-Python .so and then to put it in the right place.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list