On Apr 1, 2009, at 1:15 PM, Dag Sverre Seljebotn wrote: > Robert Bradshaw wrote: >> On Mar 31, 2009, at 8:20 AM, Nicolas Dumazet wrote: >> >>> 2009/4/1 Nicolas Dumazet <[email protected]>: >>>> I looked at ways to avoid the extra setup.py work, it seems >>>> there's no >>>> "easy way" here. >>>> I thought about extending the distutils build command to build >>>> the c >>>> files before the module build, but it's definitely not simple: >>>> if the >>>> C files are correctly generated, one would need to register the C >>>> extensions on the fly, once the build process has already started; >>>> and >>>> I'm not sure that this is possible. >>>> And yes, if it is not possible, one would need to write a complex >>>> build system handling the whole compilation chain. >>> >>> Or... the setup.py behavior could be modified: >>> When --no-cython-compile is not provided, if the system is not >>> able to >>> generate the .c, it bails out, spitting out an error, instead of >>> trying to back out "intelligently" to the pure python implementation >>> by itself. >>> >>> This would make the setup.py implementation much more simple: >>> * If --no-cython-compile is here, there's almost nothing to do. >>> * If it's not here, add the dependences on the C extensions, extend >>> the build_ext distutils command to generate the C files before >>> building the cython module, (this is actually easy to do) and... >>> voilĂ ! Just exit with an error if you can't generate the C files, >>> suggest to try --no-cython-compile instead. >> >> I'm -1 on this idea, because it complicates auto-installation of >> packages (for example, if Cython is downloaded via a package manager, >> especially as a dependance to something else). Regarding Scons, it's >> a nice build system, but I'd rather not make it a dependancy for >> Cython (especially as our build needs really aren't super >> complicated). > > About SCons, iI meant that as an apropos and strictly about support > for > end users applications. I.e. it's a matter of finding and bundling an > SCons plugin for Cython in the Tools directory, like we ship an emacs > mode. (And perhaps pointing our users towards SCons rather than > investing > too much effort in improving Cython builds using the Cython distutils > plugin; again not for Cython itself but for Cython users.)
Ah, thanks for the clarification. Yes, this would be nice to have. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
