[Distutils] setuptools special case Pyrex and break Cython

Stefan Behnel stefan_ml at behnel.de
Mon Sep 3 11:19:11 CEST 2007


Phillip Eby asked me to forward this request to the distutils mailing list, so
here it goes.

In current setuptools, the file setuptools/extension.py checks for Pyrex being
installed and otherwise renames all .pyx file entries to .c. This does not
work when Cython is installed *instead of* Pyrex, as Cython will never be
executed in this case. It just fails saying that the .c file doesn't exist.

I'm currently shipping a fake Pyrex/Distutils/build_ext.py module with lxml to
make it work with both, but I don't even see a major advantage in the
extension.py module at all. It's plain easy to do that yourself in the
setup.py script if (and only if) you want it to build without Pyrex/Cython,
but currently, it is enforced in setuptools. This really only works if the
distributor wants it and does something to make it work, so always enforcing
this behaviour doesn't give you any real advantage.

I'd like to see this module removed from setuptools or at least have Cython
supported in the same way.


More information about the Distutils-SIG mailing list