On Sun, 22 Apr 2012 20:28:29 +0200, Tomasz Rybak <[email protected]> wrote:
> Hello.
> I have tried to build PyCUDA on 64-bit Debian using Python 3,
> but got problems. Compiler complaints about
> src/wrapper/_pycuda_struct.cpp
> C++ code contains PyString_* and PyInt_* function calls, but
> those functions were replaced by PyBytes_* and PyLong_*
> 
> I am not sure what is the correct fix for this - whether
> we should surround calls to those with
> #ifdef PYTHON2
> PyString_*
> #else
> PyBytes_*
> #endif 
> or use macros:
> #ifdef PYTHON3
> #define PyString_Check(x) PyBytes_Check(x)
> #endif
> 
> etc.?

So far, PyCUDA does not support Python 3. This particular problem is
easy to fix by now, though. PyOpenCL now contains _pvt_struct_v2 and
_pvt_struct_v3, which are both modified versions of the Py2/3 struct
module with support for complex numbers. Simply copying the PyOpenCL _v3
module (and setup.py snippet) should solve this particular issue.

(And as far as I recall, that was the one remaining roadblock to
enabling PyCUDA on Python 3--though there might a few minor things left
over.)

Andreas

Attachment: pgpsrb9q5EZeC.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to