On Tue, Jun 7, 2016 at 10:36 AM, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> On 2016-06-07 10:21, Erik Bray wrote:
>>
>> It's one thing to depend on a package at runtime.  It's another thing
>> to have a dependency just so that `./setup.py --help` can work without
>> raising an ImportError :)
>
>
> Well, could it be possible to arrange things such that Cython is needed at
> *build-time* but only when actually building the package and not when doing
> --help? That would be ideal.

Yes, but it's a pain in the butt to do and would require support from
the setuptools end (without huge hacks, which astropy_helpers
currently does).  Maybe worth bringing up though...

> The reason is that cythonize() does more than just converting .pyx files to
> .c files. It can also change metadata of Extension classes, for example
> changing the language to c++ or adding libraries to link against. For simple
> projects with just a few Cython files, this might not be needed, but for
> large projects like Sage, this is a very useful feature.

I agree--I didn't realize that the old Cython.Distutils.build_ext
doesn't do this.  It's possible that whoever wrote the stuff in
Cython.Distutils just hasn't maintained it (nor as anyone else).
Using a custom setuptools command is still the way to go though, as
I've demonstrated before.

Erik

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to