Cython + setuptools not working with .pyx,only with .c-files
Stefan Behnel
stefan_ml at behnel.de
Fri Aug 7 12:31:27 EDT 2009
Diez B. Roggisch wrote:
> I'm trying to build a Cython-extension as Egg.
>
> However, this doesn't work - I can either use distutils to build the
> extension, creating a myextension.c-file on the way.
>
> If that's there, I can use setuptools to build the egg.
>
> But when I remove the .c-file, the .pyx-file isn't used to re-generate it.
setuptools monkeypatch into distutils to support Pyrex if it's installed,
but most non-bleeding-edge versions do not know about Cython and thus break
the Cython distutils support when Pyrex isn't there as well.
What helps is to put a fake Pyrex installation into your sys.path, like
http://codespeak.net/svn/lxml/trunk/fake_pyrex/
as done at the top of
http://codespeak.net/svn/lxml/trunk/setup.py
I haven't tried if newer setuptools versions have been fixed yet.
Stefan
More information about the Python-list
mailing list