[SciPy-dev] Is it ok to depend on ctypes for scipy code ?

Robert Kern robert.kern at gmail.com
Thu Jun 14 00:15:02 EDT 2007


David Cournapeau wrote:
> Robert Kern wrote:
>> David Cournapeau wrote:
>>> Mmh, do you mean building a library with  
>>>
>>> config.add_extension('foo',                                                        
>>>
>>>         sources=[join('src', 'vq.c') ])
>>>
>>> is not enought to load it through ctypes on windows ?
>> Correct. It will not even build.
>>
> But if this does not build, this means either a C compiler is not 
> available, or the C api for python is not there, right ? So this means 
> scipy has to be 100 % python code ?

<sigh> This is what I wrote:

"""
The linking process on Windows requires an extension module to actually have the
initfoo function.
"""

That is, the code that is compiled and linked by config.add_extension() must
actually be a Python extension module, not some shared library with arbitrary
contents.

Is that clear enough?

-- 
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-Dev mailing list