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

Robert Kern robert.kern@gmail....
Wed Jun 13 22:19:01 CDT 2007

David Cournapeau wrote:
> Robert Kern wrote:
>> I haven't seen one, yet; otherwise, I wouldn't have made the objection.
> Ok, I am confused. I asked the question because I thought the ctypes 
> dependency itself may be problematic

Okay, first, please answer my question as to what you were considering using
ctypes for. That will help clarify the discussion; different uses impose
different burdens.

Again, what I was talking about *here* was building the shared library in the
package itself. Another use case is to rely on having a shared library already
installed; that case carries a different set of problems.

> (who uses python 2.4 or 2.3 ? Is 
> there a list of versions we have to support ?).

We are still maintaining 2.3 compatibility.

> Is the problem locating an external library ? Because otherwise, I do 
> not see the different between ctypes or any other ways to wrap c code 
> (swig, C api, etc... which is used a lot already in scipy).

The difference is that for building, we can use configuration files; they only
have to present and correct once. If you get a binary from your distro, for
example, you don't even have to deal with configuration files at all. Requiring
configuration files at runtime for library code is a bad idea.

Also, we *do* try to avoid requiring external libraries for scipy, even at build
time. All of the external libraries are optional (I haven't tested it in a
while, but if BLAS and LAPACK libraries aren't configured, they will be
downloaded and built for you).

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