cython compile error
ever4cyth opened this issue · comments
i use cython-0.19.1.
python setup.py build
running build
running build_py
running build_ext
cythoning acora/_acora.pyx to acora/_acora.c
building 'acora._acora' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c acora/_acora.c -o build/temp.linux-x86_64-2.7/acora/_acora.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/acora/_acora.o -o build/lib.linux-x86_64-2.7/acora/_acora.so
cythoning acora/_nfa2dfa.py to acora/_nfa2dfa.c
Error compiling Cython file:
...
from _acora cimport _NfaState
cdef _visit_all(_NfaState tree, visitor)
@cython.locals(state=_NfaState, new_state=_NfaState, eq_states=set)
^
acora/_nfa2dfa.pxd:6:0: Cdef functions/classes cannot take arbitrary decorators.
building 'acora._nfa2dfa' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c acora/_nfa2dfa.c -o build/temp.linux-x86_64-2.7/acora/_nfa2dfa.o
acora/_nfa2dfa.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1
compile succeed after commenting out #@cython.locals(state=_NfaState, new_state=_NfaState, eq_states=set) in _nfa2dfa.pxd file.
python test.py
WARNING: '_acora' C extension not imported, only testing Python implementation
Ran 46 tests in 0.930s
OK
why is the cython implementation not tested?
Because it's not getting built. I pushed a proposed fix, but I'm not sure if it will currently work with a recent Cython at all. I may eventually fix that.
Just uninstall Cython and install the latest acora release, it doesn't need Cython to build.
Fixed it in current master.
Thanks for the report.