~f!jdZddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl Z ddl m ZddlmZddlmZddlmZmZddlmZd d lmZej4d ej6j8Zd Zej>d dZ dZ!ejDdZ#GddZ$y)zWheels support.N) get_platform)Version)sys_tags)canonicalize_name)write_requirements _egg_basename)_unpack_zipfile_obj)_read_utf8_with_fallbackz^(?P.+?)-(?P\d.*?) ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?) )\.whl$z8__import__('pkg_resources').declare_namespace(__name__) )maxsizec~tDchc]%}|j|j|jf'c}Scc}wN)r interpreterabiplatform)ts Y/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/setuptools/wheel.py_get_supported_tagsr"s. 9A C1Q]]AEE1:: . CC Cs*:ctj|D]$\}}}tjj||}|D]Y}tjj ||}tjj |||}tj ||[t tt|D]\} } tjj || }tjj ||| }tjj|rgtj |||| ='tj|dD]\}}}|rJtj|!y)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)topdownN) oswalkpathrelpathjoinrenamesreversedlist enumerateexistsrmdir) src_dirdst_dirdirpathdirnames filenamessubdirfsrcdstnds runpackr-*s(*(8$9'2A'',,w*C'',,w2C JJsC T)H"567DAq'',,w*C'',,w2C77>>#& 3$QK8 )9)+(F$9} )Gc#Kddlm}|j|j} d|j|y#|j|wxYww)z* Temporarily disable info traces. r)logN) distutilsr0 set_thresholdWARN)r0saveds rdisable_info_tracesr5@sC    chh 'E!  % % s"A;AAAcfeZdZdZdZdZdZdZdZdZ e dZ e d Z e d Z y ) Wheelcttjj|}|t d|z||_|j jD]\}}t|||y)Nzinvalid wheel name: %r) WHEEL_NAMErrbasename ValueErrorfilename groupdictitemssetattr)selfr<matchkvs r__init__zWheel.__init__Osb277++H56 =5@A A  OO%++-DAq D!Q .r.ctj|jjd|jjd|j jdS)z>List tags (py_version, abi, platform) supported by this wheel..) itertoolsproduct py_versionsplitrrr@s rtagsz Wheel.tagsWsI  OO ! !# & HHNN3  MM   $  r.cDtd|jDdS)z2Is the wheel compatible with the current platform?c3:K|]}|tvsdyw)TN)r).0rs r z&Wheel.is_compatible..asMa!7J7L2LTMsF)nextrLrKs r is_compatiblezWheel.is_compatible_sM499;MuUUr.c~t|j|j|jdk(rdn t dzS)Nany)rz.egg)r project_nameversionrrrKs regg_namezWheel.egg_namecs; !! "&--5"8$ln     r.c|jD]Z}tj|}|jds*t |j t |j sX|cStd)Nz .dist-infoz.unsupported wheel format. .dist-info not found)namelist posixpathdirnameendswithr startswithrUr;)r@zfmemberr[s r get_dist_infozWheel.get_dist_infomsfkkmF''/G -2CG2L2W2W!$"3"343 $ IJJr.ctj|j5}|j||dddy#1swYyxYw)z"Install wheel as an egg directory.N)zipfileZipFiler<_install_as_egg)r@destination_eggdirr^s rinstall_as_eggzWheel.install_as_eggws: __T]] + 9r  !3R 8 9 9 9s <Ac|jd|j}|j|}d|z}tjj |d}|j |||||j|||j||y)N-z%s.dataEGG-INFO) rUrVr`rrr_convert_metadata_move_data_entries_fix_namespace_packages)r@rer^ dist_basename dist_info dist_dataegg_infos rrdzWheel._install_as_egg|s|#'#4#4dllC &&r*  - 77<< 2J? r#5y(K  2I> $$X/ABr.c .ddl}fd}|d}t|jd}td|cxkxrtdknc}|std|zt |t j j||jj||j|} d } tt| | j} | jD cic]1} | t| | j| fD cgc]} | | vr|  c} 3}} } t j|t jt j j|d t j j|d t!jt#| |  }t%5t'|j)ddt j j|ddddycc} wcc} } w#1swYyxYw)Nrcjtj|5}|jj d}t j jj|cdddS#1swYyxYw)Nutf-8) openrZrreaddecodeemailparserParserparsestr)namefpvaluernr^s r get_metadataz-Wheel._convert_metadata..get_metadatasb 489 =R ((1||**,55e< = = =s A A==BWHEELz Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)metadatac&d|_t|Sr)markerstr)reqs rraw_reqz(Wheel._convert_metadata..raw_reqsCJs8Or.METADATAzPKG-INFO)install_requiresextras_require)attrsrpz requires.txt) pkg_resources parse_versiongetr;r rrr Distribution from_location PathMetadatarmaprequiresextrasrename setuptoolsdictr5rget_command_obj)r^rernrprr~wheel_metadata wheel_versionwheel_v1distrrextrarr setup_dists` ` rrjzWheel._convert_metadatas = &g.%n&8&8&IJ  '=S=;SSCmST TB 23GGLL!3Y? ))77  "//0BIN8   GT]]_ =>   w uh(?@..    )X& GGLL: . GGLL: .  ,,!1- ! "  **:6 X~6   % &  s$0$H H!H<;H H Hctjj|tjjd}tjj|rtjj|dd}tj|tj |D]}|j dr4tjtjj||Htjtjj||tjj||tj|ttjjfddDD]}t||tjjrtjyy)z,Move data entries to their correct location.scriptsriz.pycc3^K|]$}tjj|&ywr)rrr)rOr,ros rrPz+Wheel._move_data_entries..s(  Y* s*-)dataheaderspurelibplatlibN) rrrr mkdirlistdirr\unlinkrr!filterr-)rerodist_data_scriptsegg_info_scriptsentryr's ` rrkzWheel._move_data_entriess;GGLL!3Y? GGLLI> 77>>+ ,!ww||,> IV  HH% &$56>>&)IIbggll+ %5u= 7 HH& ' GGNN B  F 6- .  77>>) $ HHY  %r.cztjj|d}tjj|rt |j }|D]}tjj|g|j d}tjj|d}tjj|stj |tjj|rt|dd5}|jtdddyy#1swYxYw)Nznamespace_packages.txtrFz __init__.pywrs)encoding) rrrr r rJrrtwriteNAMESPACE_PACKAGE_INIT)rprenamespace_packagesmodmod_dirmod_initr|s rrlzWheel._fix_namespace_packagessWW\\(4LM 77>>, -!9:L!M!S!S!U )'',,'9KCIIcNK77<<?ww~~g.HHW%ww~~h/hg>9"!7899 * .99s D11D: N)__name__ __module__ __qualname__rDrLrRrWr`rfrd staticmethodrjrkrlr.rr7r7Nse  V K9 C88t  : 9 9r.r7)%__doc__rwrG functoolsrrZrerb contextlibdistutils.utilrr#setuptools.extern.packaging.versionrr setuptools.extern.packaging.tagsr!setuptools.extern.packaging.utilsrsetuptools.command.egg_inforrsetuptools.archive_utilr unicode_utilsr compileVERBOSErAr9r lru_cacherr-contextmanagerr5r7rr.rrs   'H5?I73RZZJJ  %  UT"D#D,  ! !^9^9r.