ó 2ÄÈ[c@`s¹dZddlmZmZmZddd!ZddlmZejZddl m Z m Z m Z m Z mZdd lmZdd lmZdd lmZdd „Zd „ZdS(sM Build common block mechanism for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson Permission to use, modify, and distribute this software is given under the terms of the NumPy License NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 10:57:33 $ Pearu Peterson i(tdivisiontabsolute_importtprint_functions$Revision: 1.19 $i iÿÿÿÿi(t __version__(thasbodyt hascommonthasnotet isintent_hidetoutmess(t capi_maps(t func2subr(t rmbadnamec C`sg}t|ƒrx¡|djƒD]U}i}x(|d|D]}|d|||W|j||d||fƒq#Wn7t|ƒr¶x(|dD]}|t|dƒ}q–Wn|rg}g}x?|D]7} | d|krÏ|j| dƒ|j| ƒqÏqÏW|S|S(Ntcommontvarstbodyi(RtkeystappendRtfindcommonblocks( tblockttoptrettnR tvtbttrettnamestt((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/common_rules.pyRs& %  c C`sigd6gd6dgd6}dg}|d„}dg}|d„}dg}|d„}dg}|d „} x<t|ƒD].\} } } | jƒ} gg}}x;| D]3}t| |ƒrÔ|j|ƒq®|j|ƒq®W|rtd | d j|ƒd j|ƒfƒntd | d j|ƒfƒ|d | ƒ|dƒx$| D]}|tj| |ƒƒqSW| dkr™|dd j| ƒƒn|d| d j| ƒfƒ|dd j|ƒƒ|dƒ|d| ƒg}x°|D]¨}tj | |ƒ}tj |}tj || |ƒ}|drP|jd|dƒn |jdƒ|dj ƒ}|s|d}n|d||d||fƒqòW|dƒt |ƒ}d jg|D]}d|^qÁƒ}|d| |fƒ|dƒx"|D]}|d| |fƒqÿW|dƒd | kr<d!}nd"}|d#|| | jƒd jd$gt|ƒƒfƒ|d%| ƒ|d&|| | jƒ| fƒ|d'ƒ|d(| | | fƒ| jd d)ƒ}| d*|ƒ| d+ƒx||D]t}| d,tj|| |ƒƒt| |ƒrø| |d-}t|tƒr[d.j|ƒ}n| d/|ƒqøqøW| d0ƒ|djd1| d jtd2„||ƒƒfƒqW||d<||d<|d3|d4scS`sd|d|f|dsitlatexdoci(RtlowerRRRtjoinR tvar2fixfortranR tgetctypet c2capi_mapt getarrdimststripR tuppertlentreplacet getarrdocsignRt isinstancetlisttmap(tmRtfwrapR!tchooksR"tihooksR#tdocR$tnametvnamesR t lower_namethnamestinamesRtidimstcttattdmtdmstinames1R t inames1_tpsR,ttnameR-((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/common_rules.pyt buildhooks5s¨            &         "  &     !     -   N(t__doc__t __future__RRRRRtversiont f2py_versiontauxfuncsRRRRRR R t crackfortranR RRQ(((s6/tmp/pip-build-fiC0ax/numpy/numpy/f2py/common_rules.pyts  (