Sean Gillies
2011-07-08 16:16:48 UTC
Hi all,
Last night I began experimenting with PyPy and Shapely. It's cool to
see virtualenv, pip, and distribute working with PyPy. Shapely does
install on PyPy 1.5.0 (thanks, Oliver), but doesn't quite work:
(pypy-2d192eaab45f-osx64)s3:pypy-env seang$ python
Python 2.7.1 (2d192eaab45f, Jul 07 2011, 22:10:02)
[PyPy 1.5.0-alpha0 with GCC 4.0.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``Duesseldorf sprint started''
RuntimeWarning: C function without declared arguments called
...
File "/Users/seang/virtualenv/pypy-2d192eaab45f-osx64/site-packages/shapely/geos.py",
line 266, in __init__
self.geos_handle = self._lgeos.initGEOS_r(notice_h, error_h)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 677, in __call__
return CFuncPtr.__call__(self, *args)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 336, in __call__
newargs, argtypes, outargs = self._convert_args(argtypes, args, kwargs)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 535, in _convert_args
raise ArgumentError(str(e))
ArgumentError: expected c_void_p instance instead of CFunctionType
It seems like this may be one of the limitations noted at
http://codespeak.net/pypy/dist/pypy/doc/ctypes-implementation.html#discussion-and-limitations
Anybody else been trying our software with PyPy?
Last night I began experimenting with PyPy and Shapely. It's cool to
see virtualenv, pip, and distribute working with PyPy. Shapely does
install on PyPy 1.5.0 (thanks, Oliver), but doesn't quite work:
(pypy-2d192eaab45f-osx64)s3:pypy-env seang$ python
Python 2.7.1 (2d192eaab45f, Jul 07 2011, 22:10:02)
[PyPy 1.5.0-alpha0 with GCC 4.0.1] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``Duesseldorf sprint started''
from shapely.geometry import Point
/Users/seang/virtualenv/pypy-2d192eaab45f-osx64/site-packages/shapely/geos.py:96:RuntimeWarning: C function without declared arguments called
...
File "/Users/seang/virtualenv/pypy-2d192eaab45f-osx64/site-packages/shapely/geos.py",
line 266, in __init__
self.geos_handle = self._lgeos.initGEOS_r(notice_h, error_h)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 677, in __call__
return CFuncPtr.__call__(self, *args)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 336, in __call__
newargs, argtypes, outargs = self._convert_args(argtypes, args, kwargs)
File "/Users/seang/opt/pypy-2d192eaab45f-osx64/lib_pypy/_ctypes/function.py",
line 535, in _convert_args
raise ArgumentError(str(e))
ArgumentError: expected c_void_p instance instead of CFunctionType
It seems like this may be one of the limitations noted at
http://codespeak.net/pypy/dist/pypy/doc/ctypes-implementation.html#discussion-and-limitations
Anybody else been trying our software with PyPy?
--
Sean
Sean