[Cython] error with cimport python_version
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Mon Jan 19 14:44:00 CET 2009
This is a bug in Cython which we must fix. As a temporary solution you can replace "char[]" with "char*" in that pxd file.
Dag Sverre Seljebotn
-----Original Message-----
From: "Case Vanhorsen" <casevh at gmail.com>
Date: Monday, Jan 19, 2009 8:23 am
Subject: [Cython] error with cimport python_version
To: cython-dev at codespeak.netReply-To: cython-dev at codespeak.net
I'm probably doing something wrong, but I'm getting an error when I
>try to compile the following:
>
>cimport python_version
>
>
>print hex(python_version.PY_VERSION_HEX)
>
>
>The error message is:
>
>using Cython
>running build_ext
>cythoning test.pyx to test.c
>
>Error converting Pyrex file to C:
>------------------------------------------------------------
>...
> # 0xA (alpha)
> # 0xB (beta)
> # 0xC (release candidate)
> # 0xF (final)
>
> char[] PY_VERSION
> ^
>------------------------------------------------------------
>
>/usr/local/lib/python2.6/site-packages/Cython/Includes/python_version.pxd:31:8: Buffer types only allowed as function local variables
>
>Error converting Pyrex file to C:
>------------------------------------------------------------
>...
> # 0xB (beta)
> # 0xC (release candidate)
> # 0xF (final)
>
> char[] PY_VERSION
> char[] PY_PATCHLEVEL_REVISION
> ^
>------------------------------------------------------------
>
>/usr/local/lib/python2.6/site-packages/Cython/Includes/python_version.pxd:32:8: Buffer types only allowed as function local variables
>
>If I comment out the last two lines of python_version, it does compile properly and I get the correct hex value. I tried both 0.10.3 and
>cython-devel.
>
>Suggestions?
>
>Case
>_______________________________________________
>Cython-dev mailing list
>Cython-dev at codespeak.net
>http://codespeak.net/mailman/listinfo/cython-dev
>
More information about the Cython-dev
mailing list