[SciPy-Dev] [PATCH] Scipy and python2.7

Fabian Pedregosa fabian.pedregosa at inria.fr
Thu Jul 22 08:13:14 EDT 2010


Hi all.

With some minor changes I could install scipy using python2.7. The  
only thing that failed was the c++ swig wrappers in  
scipy.sparse.sparsetools. I believe this is because python is compiled  
now using gcc and not g++, and also default flags have changed.

The problem seems to be that numpy/ndarraytypes.h import inttypes.h,  
but the macros in this file are not accessibly from C++ unless you  
define the variable __STDC_FORMAT_MACROS. My solution was to define  
this variable in the setup.py script. This makes it build fine and  
test are OK too (ubuntu linux 64 bit). I attach the (git) patch.

~Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FIX-define-macro-to-access-C99-extensions-from-C.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100722/b5ad1b4a/attachment.bin>


More information about the SciPy-Dev mailing list