It happened with this minimal configuration:
https://groups.google.com/d/msg/cython-users/vox0ECQlo_Q/x7ICiI79DAAJNot locally, where I developed, but after the following steps:
On the mac (the code works fine) :
- python setup.py build_ext --inplace # local development
- python setup.py sdist # .c extensions are also copied to /dist by default, for some reason
- archive /dist
- scp dist.tar.gz @some-linux-server
On the linux machine:
- extract dist.tar.gz
- python setup.py build_ext --inplace # uses the already present .c instead of recompiling
- try to import the extension: error.
So on the new machine, one has to remove the .c before rebuilding. I excluded it in MANIFEST.in and now it works.
The problem is more that the error message is very cryptic.