Ӟ5g dZdZddlZddlZddlmZddlZejdejddZdZ d d Z d Z e d k(re yy) zL Determine package version information from configure.ac file for Asymptote z9Supakorn 'Jamie' Rassameemasmuang N)TextIOzFAC_INIT\(\s*\[\s*(.+)\s*]\s*,\s*\[\s*(.+)\s*]\s*,\s*\[\s*(.+)\s*]\s*\)zASYGLVERSION=(.+))baseasyglc .tt}t}|D]}|s|cS|jDcic]\}}||j|}}}|jDcic] \}}| || }}}|jD]w\}}|j ||dk(rB|j |j d|j d|j dd|dk(sd|j d|d<y|Scc}}wcc}}w)zm Returns a dictionary containing version information, if found from the configure.ac file object r)name version-base issue-urlr asygl-version)dictREGEXESitemsmatchpopupdategroup) fregexes_to_searchresultlinekeyval regex_resultregex_result_not_none match_objs +/u/src/asymptote-2.94/determine_pkg_info.pyprocess_configure_ac_filers W  VF M=N=T=T=VW=VcSYYt_,=V W%1%7%7%9; %9cS_CH%9 ; 499;NC  ! !# &f} ) 2(1(:%.__Q%7g~*3//!*<'<& M!X; sD * D5Dc`t|dd5}t|cdddS#1swYyxYw)zf Returns a dictionary containing version information, if found from the ac_file specified rzutf-8)encodingN)openr)ac_filers rdetermine_asy_pkg_infor%3s2    (+    s $-c&ttjtjdz }|j dd|j dd|j dd|j dd f}t d j|d y) N configure.acr z NAME-UNKNOWNr zVERSION-UNKNOWNr zISSUE-URL-UNKNOWNr z ASYGL-UNKNOWN;)end)r%pathlibPath__file__parentgetprintjoin)pkg_version_info version_tuples rmainr4@s- X%%6 V^4^->?[*=>_o> M  #((= !r*__main__)r') __doc__ __author__osr+typingrrecompilerrr%r4__name__r5rr?sp I   BJJ #  RZZ, -  : , + zFr5