I'm not sure if it's better to report this here or to pyfits, but there is a return type
bug that affects installing the developer build of astropy with numpy 1.7b2
and python 3.3.
Digging around, __multiarray_api.h (in numpy/core/include/numpy)
defines import_array (a macro) to return an actual value in numpy 1.7
for python 3.+, while for earlier versions it just does a return (that is,
it's void). That means that anything that calls import_array can't be a void function for bleeding edge
numpy/python builds. And compression_module_init in astropy/astropy/io/fits/src/compressionmodule.c
fails exactly that test.
To be a little more explicit, the numpy API has:
#if PY_VERSION_HEX >= 0x03000000
#define NUMPY_IMPORT_ARRAY_RETVAL NULL
#else
#define NUMPY_IMPORT_ARRAY_RETVAL
#endif
#define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; } }
and compression_module_init is of type void, and calls this macro.
The compiler doesn't much care for that.
I made a quick fix for my purposes by just making compression_module_init
return int*, but that would break things for numpy < 1.7 or python < 3.
This probably means something like
#if PY_VERSION_HEX >= 0x03000000
int* compression_module_init(PyObject* module) {
#else
void compression_module_init(PyObject* module) {
#endif
which is pretty hideous.
Alex