Hi, I am sorry, it looks problem lies elsewhere. I used python2 on linux and python3 on windows (I don't know why I haven't mentioned this).
Using python3 on linux leads to same problems, importing doesn't stop and continues only to fail with non-related error message.
https://gist.github.com/3552432is output of
#python -v -v -c "import cy2geom"
Why does this error occur only with python3? Generated code looks the same.
Is there any way to get rid of this without removing circular imports? Right now, I use scheme similar to following:
_cy_primitives.pxd declares extension type cy_Point
_cy_primitives.pyx implements methods for cy_Point
_cy_rectangle.pxd declares extension type cy_Rectangle
_cy_rectangle.pyx implements methods for cy_Rectangle
imports:
_cy_rectangle.pxd cimports cy_Point from _cy_primitives
_cy_primitives.pyx cimports cy_Rectangle from cy_rectangle
--------------------
I used to think that it's okay, since cimporting only looks at .pxd parts of declarations, but since pxd and pyx are merged, this isn't necessarily true.
I might follow-up with question about dealing with interwinted C++ modules in cython :)
Best regards
Jan Pulmann