Nathan Dunfield | 22 Apr 05:21 2012

[Cython] Cython 0.16: problems with "easy_install"

Dear all,

On OS X Snow Leopard with XCode 3.2.*, I encountered the following issues when using "easy_install" to
install the new Cython 0.16:

(a) With Python 2.7 where Cython 0.15.1 had previously been installed, "easy_install" failed with the
below error message; looks like it's somehow using the existing Cython for part of the compilation and
then failing.  After I deleted the existing egg in site-packages it easy_installed fine.

(b) With Python 3.2 and no Cython installed in site-packages, it chokes with the following error:

haken ~ (8) py3 -m easy_install -U cython
Searching for cython
Reading http://pypi.python.org/simple/cython/
Couldn't find index page for 'cython' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Reading http://pypi.python.org/simple/Cython/
Reading http://www.cython.org
Reading http://cython.org
Best match: Cython 0.16
Downloading http://www.cython.org/release/Cython-0.16.zip
Processing Cython-0.16.zip
Running Cython-0.16/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ers4by/Cython-0.16/egg-dist-tmp-a6gz6a
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
warning: no files found matching '*.h' under directory 'Cython/Utility'
warning: no files found matching '.cpp' under directory 'Cython/Utility'
(Continue reading)

Nathan Dunfield | 22 Apr 19:59 2012

[Cython] Cython 0.16: "eval" problem

With Cython 0.15, the following works with Python 2.7:

### start file: prob.pyx

def f(x):
    cdef int* p
    return eval(x)

### end file

>>> import pyximport; pyximport.install()
>>> import prob
>>> prob.f("5")
5

but with Cython 0.16 it doesn't even compile:

>>> import prob

Error compiling Cython file:
------------------------------------------------------------
...
def f(x):
    cdef int* p
    return eval(x)
              ^
------------------------------------------------------------

prob.pyx:3:15: Cannot convert 'int *' to Python object

(Continue reading)

Vitja Makarov | 22 Apr 20:22 2012
Picon

Re: [Cython] Cython 0.16: "eval" problem

2012/4/22 Nathan Dunfield <nmd@...>:
> With Cython 0.15, the following works with Python 2.7:
>
> ### start file: prob.pyx
>
> def f(x):
>    cdef int* p
>    return eval(x)
>
> ### end file
>
>>>> import pyximport; pyximport.install()
>>>> import prob
>>>> prob.f("5")
> 5
>
> but with Cython 0.16 it doesn't even compile:
>
>>>> import prob
>
> Error compiling Cython file:
> ------------------------------------------------------------
> ...
> def f(x):
>    cdef int* p
>    return eval(x)
>              ^
> ------------------------------------------------------------
>
> prob.pyx:3:15: Cannot convert 'int *' to Python object
(Continue reading)


Gmane