Phillip J. Eby wrote:
At 08:30 AM 9/5/2007 +0200, Stefan Behnel wrote:
Perhaps you'd care to produce a patch to implement that "cleaner step"? It's not at all obvious to me how to do that without introducing instability that would be unsuitable for an 0.6cN release.
One way of implementing the above change would be to move the replacement code into build_ext rather than Extension. Something like the (untested) build_ext-patcher.py I attached. Note the type check that tests for build_ext being subclassed.
You're illustrating my point. It's easy to hand-wave about how it should be done, but not so easy to actually *do*. Did you look at where all the .sources attribute gets used? How the build_ext command can get called by other commands?
Sort of. Do you doubt it should work that way?
You're also ignoring my larger point: the current mechanism allows you to write setup scripts that *don't* need to subclass build_ext. A setuptools-based setup script just refers to '.pyx' files, and everything else happens automatically.
The script I posted doesn't change that. Read it.
And if you need to be able to distinguish between Cython-specific and Pyrex-specific files, why are you using the same file extension?
We don't distinguish, it's the same language. But users will have to install both of them to satisfy the requirements of the software they install, so there are limits to what the Cython developers can do on their side. You're actually forgetting the point you stressed most. If we prevent users from installing Cython and Pyrex at the same time, they will have to start modifying setup.py scripts. So it's pushing the burden on them. Stefan