That it, you just have to add the missing #endif after m = Py_InitModule .....
Thank you, Nadav. -----Original Message----- From: numpy-discussion-boun...@scipy.org on behalf of Charles R Harris Sent: Sun 23-May-10 20:48 To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Can not compile numpy with python2.7 onllinux On Sun, May 23, 2010 at 1:40 AM, Nadav Horesh <nad...@visionsense.com>wrote: > > I think that line 3405 in _capi.c (svn 8386) > should be: > > #if PY_VERSION_HEX >= 0x03010000 > > > (At least it looks reasonable considering line 3375, and it solves my > problem) > > Does the following work? PyCObject is deprecated in 2.7. #if PY_VERSION_HEX >= 0x03010000 m = PyModule_Create(&moduledef); #else m = Py_InitModule("_capi", _libnumarrayMethods); #if PY_VERSION_HEX >= 0x02070000 c_api_object = PyCapsule_New((void *)libnumarray_API, NULL, NULL); if (c_api_object == NULL) { PyErr_Clear(); } #else c_api_object = PyCObject_FromVoidPtr((void *)libnumarray_API, NULL); #endif Chuck > Nadav > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
<<winmail.dat>>
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion