[Distutils] setuptools special case Pyrex and break Cython
Phillip J. Eby
pje at telecommunity.com
Mon Sep 3 17:41:42 CEST 2007
At 11:19 AM 9/3/2007 +0200, Stefan Behnel wrote:
>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.
I guess I'm not clear on the actual problem here. Do you want it to
only rename .pyx to .c for .c files that actually exist? A better
way to specify that you can handle .pyx files?
Note that removing this feature is not an option that's on the table,
as it was one of the original reasons I created setuptools in the
first place, years before the idea of eggs even existed.
Now, in future versions of setuptools, the ones that eventually
replace a lot of distutils framework with new stuff, there will
definitely be a better way of handling this. But I have no idea when
that will happen.
More information about the Distutils-SIG
mailing list