install PyICU under pypy

632 Views Asked by At

I want to install pyicu on pypy on Ubuntu linux, but this command returns the following error:

cc -O2 -fPIC -Wimplicit -I/opt/pypy-2.0.2/include -c format.cpp -o build/temp.linux-  
x86_64-2.7/format.o -DPYICU_VER="1.5"
cc1plus: attention : command line option ‘-Wimplicit’ is valid for C/ObjC but not for  
C++[enabled by default]
format.cpp: In function ‘int t_fieldposition_init(t_fieldposition*, PyObject*,   
PyObject*)’:
format.cpp:342:14: erreur: ‘struct PyTupleObject’ has no member named ‘ob_item’
error: command 'cc' failed with exit status 1

Is that the package is not compatible with pypy and if so how I can install?

2

There are 2 best solutions below

0
On

This is "cpyext", the C extension module compatibility layer of PyPy. It cannot emulate the CPython structures well enough for C extension modules that directly access private stuff in them. In this case, the ob_item field in the structure PyTupleObject. This means that PyICU doesn't work on PyPy.

How to help change the situation: fix PyICU to use only the official interface.

0
On

PyICU may now be built on PyPy too. This is currently available from its trunk svn repository: http://svn.osafoundation.org/pyicu/trunk/