Michael Schurter wrote:
> The following setup.py file doesn't generate the proper .c file when
> running install, build, or build_ext targets:
> 
> from setuptools import setup, find_packages
> from pkg_resources import require
> require('Cython')
> from Cython.Distutils import build_ext
> from Cython.Distutils.extension import Extension
> [...]
> I've added print statements in Cython.Distutils.extension.Extension to
> find out that distutils.extension is turning these sources:
> 
> ['bixdata/bixidx.c', 'bixdata/cbix.pyx']
> 
> ...into this:
> 
> ['bixdata/bixidx.c', 'bixdata/cbix.c']

That's a known 'feature' in setuptools. When it sees a .pyx file, it checks
for Pyrex being installed instead of Cython, and if that's not the case, it
changes the .pyx into .c, which obviously breaks the build.

What you can do is to provide a fake Pyrex in your sources, like this:

http://codespeak.net/svn/lxml/trunk/fake_pyrex/

and include it in your Python path as at the top of this setup.py file:

http://codespeak.net/svn/lxml/trunk/setup.py

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to