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...


>>> in your setup.py, and it handle the .pyx dependencies (including
>>> transitive dependence of libraries) and does all the .pyx -> .c
>>> translation. (In particular, this does away with the need for a
>>> customized build_ext extension, which is especially nice for projects
>>> their own.  There are also mechanisms for specifying more build
>>> information in the source file itself--see
>>> http://hg.cython.org/cython-devel/file/tip/tests/build/inline_distutils.srctree
>>> for an example. This will also be useful for non-distutils setups
>>> (e.g. pyximport and inline code).
>>>
>>> Try it out and let me know what you think in terms of features and API.
>>>
>>> - Robert
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> [email protected]
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>
>>
>>
>>
>> --
>> 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
>>
> _______________________________________________
> 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

Reply via email to