Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-19 Thread Manuel Nuno Melo
This strayed a bit from the original topic, but yes, I should bring this up with setuptools project. Thanks for the feedback. (My feeling was that this was a somewhat stalled problem, reported in two issues and persisting after a couple of years: #209

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-19 Thread Erik Bray
On Mon, Apr 18, 2016 at 6:56 PM, Manuel Nuno Melo wrote: > Ah, sorry Erik, you're absolutely right. I mixed my results a bit and must > elaborate: > > 'setup_requires' on its own will indeed not generate the behavior I > described. > > However, if you define the same dependency under 'setup_requir

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-18 Thread Manuel Nuno Melo
Ah, sorry Erik, you're absolutely right. I mixed my results a bit and must elaborate: 'setup_requires' on its own will indeed not generate the behavior I described. However, if you define the same dependency under 'setup_requires' AND 'install_requires', then you get the mess I mentioned. Essenti

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-18 Thread Erik Bray
On Sat, Apr 16, 2016 at 1:29 PM, Manuel Nuno Melo wrote: > Hi Erik, > Please post your solution; I'm curious to see it. Will do in a bit. I need to see if I can distill it somewhat from its original context so that it can be better understood. > Currently, we're also using setup_requires but are

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-16 Thread Manuel Nuno Melo
Hi Erik, Please post your solution; I'm curious to see it. Currently, we're also using setup_requires but are moving away from it because of two main issues: 1- there's no flexibility to hook into it via setuptools.Distribution subclassing (unless you rewrite the entire __init__); 2- (and more s

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-16 Thread Erik Bray
On Apr 14, 2016 21:07, "Manuel Nuno Melo" wrote: > > Our need to control cythonization comes from the fact that we implement cython as a lazy and optional dependency. Lazy in the sense that we delay as much as possible cythonization so that setuptools or pip have time to install cython, if needed.

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-14 Thread Robert Bradshaw
I agree that we shouldn't disallow distutils' Extensions just because setuptools was imported. https://github.com/cython/cython/commit/d804bd2d8d9aac04b92d4bfb8dbc7f8a4c8079ac On Thu, Apr 14, 2016 at 12:07 PM, Manuel Nuno Melo < manuel.nuno.m...@gmail.com> wrote: > Our need to control cythonizat

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-14 Thread Manuel Nuno Melo
Our need to control cythonization comes from the fact that we implement cython as a lazy and optional dependency. Lazy in the sense that we delay as much as possible cythonization so that setuptools or pip have time to install cython, if needed. Optional because we distribute both .pyx and cythoniz

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-14 Thread Matthew Brett
On Thu, Apr 14, 2016 at 6:08 AM, Erik Bray wrote: > On Wed, Apr 13, 2016 at 9:35 PM, Manuel Nuno Melo > wrote: >> Hello devs, >> >> I'm developing the setup.py for a scientific package, MDAnalysis (see PR >> #799). We depend on distutils and setuptool. Namely, we use >> setuptools.extension.Exten

Re: [Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-14 Thread Erik Bray
On Wed, Apr 13, 2016 at 9:35 PM, Manuel Nuno Melo wrote: > Hello devs, > > I'm developing the setup.py for a scientific package, MDAnalysis (see PR > #799). We depend on distutils and setuptool. Namely, we use > setuptools.extension.Extension class for our extensions. > > Some older versions of se

[Cython] Cannot cythonize subclasses of setuptools.extension._Extension

2016-04-14 Thread Manuel Nuno Melo
Hello devs, I'm developing the setup.py for a scientific package, MDAnalysis (see PR #799 ). We depend on distutils and setuptool. Namely, we use setuptools.extension.Extension class for our extensions.