g ddlmZddlZddlZddlZddlmZddl m Z ddl m Z ddl mZejdZd dZd d Zy) ) annotationsN)BytesGenerator) BytesParser) WheelError) WheelFilez6^(?P(?P.+?)-(?P\d.*?))\.dist-info$c tj|Dcgc]V}tjjtjj ||rt j |r|X}}t|dkDrtd||std||d}t j |jd}tjj ||d}t|d5}ttjjj|} | j!d g} | j#d } | std |d  d d d ||n }|H d =|r || d <|d|zz }| k7r1t|d5}t%|dj'| d d d t) } tjj ||d| d} t+| d5}t-d| ddd|j/|d d d t-dy cc}w#1swYxYw#1swYxYw#1swY2xYw)aBRepack a previously unpacked wheel directory into a new wheel file. The .dist-info/WHEEL file must contain one or more tags so that the target wheel file name can be determined. :param directory: The unpacked wheel directory :param dest_dir: Destination directory (defaults to the current directory) z)Multiple .dist-info directories found in z#No .dist-info directories found in rnameverWHEELrb)policyTagBuildzNo tags present in z./WHEEL; cannot determine target wheel filenameN-wb) maxheaderlenz.whlwzRepacking wheel as z...T)endflushOK)oslistdirpathisdirjoin DIST_INFO_REmatchlenrgroupopenremailr compat32parseget_allgetrflattencompute_taglinerprint write_files) directorydest_dir build_numberfndist_info_dirs dist_info_dir name_versionwheel_file_pathfinfotagsexisting_build_numbertagline wheel_pathwfs =/opt/hc_python/lib/python3.12/site-packages/wheel/cli/pack.pypackr;s7**Y''B 77==i4 5,:L:LR:P '  >QDYKPQQ >ykJKK#1%M%%m4::9ELggll9mWEO ot $%,,"7"78>>qA,,ub1 $ 1%m_5!"  %$0#;5$I 2H;>I Ict|Dchc]}|jddc}}t|Dchc]}|jddc}}t|Dchc]}|jddc}}djdj|dj|dj|gScc}wcc}wcc}w)zcCompute a tagline from a list of tags. :param tags: A list of tags :return: A tagline rrr .)sortedsplitr)r5tagimplsabivers platformss r:r(r(Ls 6#CIIcN1%6 7E484CciinQ'489GT:Tc #q)T:;I 88SXXe_chhw&7)9LM NN78:sCC C )r+strr,rEr-z str | NonereturnNone)r5z list[str]rFrE) __future__r email.policyr"os.pathrreemail.generatorr email.parserr wheel.clirwheel.wheelfilercompilerr;r(r:rSs:" *$ %rzzST :z OrR