On 14 September 2010 13:14, Robert Bradshaw <[email protected]> wrote: > On Tue, Sep 14, 2010 at 8:54 AM, Lisandro Dalcin <[email protected]> wrote: >> On 14 September 2010 12:42, Robert Bradshaw >> <[email protected]> wrote: >>> On Tue, Sep 14, 2010 at 6:57 AM, Lisandro Dalcin <[email protected]> wrote: >>>> On 14 September 2010 02:19, Robert Bradshaw >>>> <[email protected]> wrote: >>>>> I've pushed an implementation of >>>>> http://wiki.cython.org/enhancements/distutils_preprocessing . This >>>>> allows one do write, e.g. >>>>> >>>>> module_list = cythonize("*.pyx") >>>>> >>>> >>>> What happens if you run 'python setup.py --help', for example? Will >>>> that trigger cythonization? >>> >>> Yes. This is still a TODO item. Does anyone know if there an easy way >>> to detect this? >>> >> >> AFAICT, the robust way is to implement a new a "build_src" distutils >> command, and add insert it to build.subcommands list before build_ext. >> IIUC, this is more or less what NumPy does. But this kind of >> monkeypatching is not a pleasure to code... > > I agree. And this would conflict with anyone else doing such > monkeypatching as well...
Well, perhaps it can be done in a clever way, and also calling the command "build_pyx". The key here is to get the 'build' and 'build_ext' command at runtime, and figure out the proper insertion point (i.e, before build_ext) for build_pyx in the build.subcommands list... > One of my goals was to completely > dis-entangle this from the whole distutils stack. > As long as you use setup.py, you simply cannot dis-entangle distutils. Robert, you cythonize() api is nice, it will work in many cases and will be fine for many users. But my point is that at some point we should try to add an additional layer with a build_pyx command. > Another option might be to make module_list a lazily created iterable > object. I wonder if distutils requires a list though... > Yep, it requires a list... > - Robert > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
