Hi,
I had some troubles to cross-compile Cython in buildroot, but in the end was able to do it. I wanted to ask here if it makes sense to integrate the solution in Cython somehow (although I am not really sure how...)...
The basic problem was the "build_ext" step in "setup.py", which loads the Cython libraries from the "build" direcory. This directory contains binaries for the target architecture, so they cannot be loaded when I compile on the host (I get an error about the wrong architecture). As I have to seperately compile and install cython for the host anyway, it is save to just fall back to the host Cython. In my case I just had to comment line 186 in the setup.py, which adds the "build" path to sys.path:
https://github.com/cython/cython/blob/master/setup.py#L186The question is how to detect if cython is cross-compiled; then one could just add one "if" statement before the "sys.path.append". Compiling the cython for the host was straight-forward, btw, I just followed the buildroot documentation for Python packages.
Peter