U ÀÒ.eH¨ã@s4dZddlmZddlZddlZddlZddlZddlZddlZ ddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lm Z m!Z!m"Z"dd l#m$Z$m%Z%ddl&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-m.Z.m/Z/ddl0m1Z1ddl2m3Z3m4Z4m5Z5m6Z6ddl7m8Z8ddl9m:Z:ddl;mZ>ddl?m@Z@e:�rddlAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMddlNmOZOddlPmQZQddlRmSZSddlTmUZUddlVmWZWeGeXdfZYeLeQgeZfZ[d Z\e ]e^¡Z_d!d"„Z`dXd$d%„ZadYd&d'„Zbd(d)„Zcd*d+„Zdd,d-„Zee  fd.e jg¡Zhd/d0„Zid1d2„Zjd3d4„Zkd5d6„Zld7d8„ZmGd9d:„d:enƒZod;d<„ZpGd=d>„d>eƒZqdZdAdB„ZrdCdD„ZsdEdF„ZtdGdH„ZuGdIdJ„dJevƒZwe  fdKe jx¡fdLdM„ZydNdO„ZzdPdQ„Z{dRdS„Z|dTdU„Z}GdVdW„dWevƒZ~dS)[zH Support for installing and building the "wheel" binary package format. é)Úabsolute_importN)Úurlsafe_b64encode)ÚParser)Ú pkg_resources)Ú ScriptMaker)Úget_export_entry)Úcanonicalize_name)ÚStringIO)Ú pep425tags)ÚInstallationErrorÚInvalidWheelFilenameÚUnsupportedWheel)Údistutils_schemeÚget_major_minor_version)ÚLink)Ú indent_log)Úhas_delete_marker_file)Úcaptured_stdoutÚ ensure_dirÚ read_chunks)Úmake_setuptools_shim_args)Ú LOG_DIVIDERÚcall_subprocessÚformat_command_argsÚrunner_with_spinner_message)Ú TempDirectory)ÚMYPY_CHECK_RUNNING)Ú open_spinner)Ú unpack_file)Ú path_to_url) ÚDictÚListÚOptionalÚSequenceÚMappingÚTupleÚIOÚTextÚAnyÚIterableÚCallableÚSet)Ú Requirement)ÚInstallRequirement)ÚRequirementPreparer)Ú WheelCache)Ú Pep425Tag.)ércCstj ||¡ tjjd¡S)Nú/)ÚosÚpathÚrelpathÚreplaceÚsep)ÚsrcÚp©r:ú7/usr/lib/python3.8/site-packages/pip/_internal/wheel.pyÚnormpathOsr<éc CsRt ¡}d}t|dƒ�.}t||d�D]}|t|ƒ7}| |¡q$W5QRX||fS)z5Return (hash, length) for path using hashlib.sha256()rÚrb)Úsize)ÚhashlibZsha256ÚopenrÚlenÚupdate)r4Ú blocksizeÚhÚlengthÚfÚblockr:r:r;Ú hash_fileSs  rIcCs6t||ƒ\}}dt| ¡ƒ d¡ d¡}|t|ƒfS)z?Return (encoded_digest, length) for path using hashlib.sha256()zsha256=Úlatin1ú=)rIrÚdigestÚdecodeÚrstripÚstr)r4rDrErFrLr:r:r;Úrehash_sÿþþrPcCs6tjddkri}d}n ddi}d}t|||f|ŽS)NréÚbÚnewlineÚ)ÚsysÚ version_inforA)ÚnameÚmodeÚnlÚbinr:r:r;Ú open_for_csvjs r[cCs| d¡}||d<d |¡S)zBReplace the Python tag in a wheel file name with a new value. ú-éýÿÿÿ)ÚsplitÚjoin)Z wheelnameZnew_tagÚpartsr:r:r;Úreplace_python_tagus rac Cs tj |¡rœt|dƒ�R}| ¡}| d¡s8W5QR£dStj t  ¡¡}d|tj  d¡}|  ¡}W5QRXt|dƒ�}|  |¡|  |¡W5QRXdSdS) zLReplace #!python with #!/path/to/python Return True if file was changed.r>s#!pythonFs#!ÚasciiÚwbTN) r3r4ÚisfilerAÚreadlineÚ startswithrUÚ executableÚencodeÚgetfilesystemencodingÚlinesepÚreadÚwrite)r4ZscriptÚ firstlineZexenameÚrestr:r:r;Ú fix_script~s     rozX^(?P(?P.+?)(-(?P.+?))?) \.dist-info$c CsŒ| dd¡}t |¡D]p}t |¡}|r| d¡|krttj ||d¡ƒ�6}|D]*}|  ¡  ¡}|dkrPW5QR£dSqPW5QRXqdS)zP Return True if the extracted wheel in wheeldir should go into purelib. r\Ú_rWÚWHEELzroot-is-purelib: trueTF) r6r3ÚlistdirÚ dist_info_reÚmatchÚgrouprAr4r_ÚlowerrN)rWÚwheeldirZ name_foldedÚitemrtÚwheelÚliner:r:r;Úroot_is_purelib–s    r{c sÂtj |¡siifSt|ƒ�8}tƒ}|D]}| | ¡¡| d¡q(| d¡W5QRXtj   |¡}|  di¡}|  di¡}dd„‰t ‡fdd„|  ¡Dƒƒ}t ‡fd d„|  ¡Dƒƒ}||fS) NÚ rZconsole_scriptsZ gui_scriptscSst|ƒ dd¡ d¡S)zRget the string representation of EntryPoint, remove space and split on '='ú rTrK)rOr6r^)Úsr:r:r;Ú _split_ep¼sz"get_entrypoints.._split_epc3s|]}ˆ|ƒVqdS©Nr:©Ú.0Úv©rr:r;Ú Âsz"get_entrypoints..c3s|]}ˆ|ƒVqdSr€r:r�r„r:r;r…Ãs)r3r4ÚexistsrAr rlÚstripÚseekrZ EntryPointZ parse_mapÚgetÚdictÚvalues)ÚfilenameÚfpÚdatarzZ entry_pointsÚconsoleÚguir:r„r;Úget_entrypoints§s      r‘c sJ|sdSt t¡}|D]*}tj |¡}tj |¡}|| |¡qdd„tj  dd¡  tj ¡Dƒ‰ˆ  tj  tj tj¡¡¡‡fdd„| ¡Dƒ}|sœdSg}| ¡D]b\}}t|ƒ}t|ƒdkrÔd  |d ¡} n$d  d  |dd …¡d|d ¡} |  d | |¡¡q¨d} t|ƒdk�r0|  |  d¡¡n|  |  d¡¡d |¡S)zžDetermine if any scripts are not on PATH and format a warning. Returns a warning message if one or more scripts are not on PATH, otherwise None. NcSs g|]}tj |¡ tj¡‘qSr:)r3r4ÚnormcaserNr7)r‚Úir:r:r;Ú Ùsz5message_about_scripts_not_on_PATH..ÚPATHrTcs&i|]\}}tj |¡ˆkr||“qSr:)r3r4r’)r‚Ú parent_dirÚscripts©Z not_warn_dirsr:r;Ú àsÿz5message_about_scripts_not_on_PATH..r1z script {} isrzscripts {} areú, éÿÿÿÿz and z.The {} installed in '{}' which is not on PATH.zeConsider adding {} to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.zthis directoryzthese directoriesr|)Ú collectionsÚ defaultdictÚsetr3r4ÚdirnameÚbasenameÚaddÚenvironr‰r^ÚpathsepÚappendr’rUrgÚitemsÚsortedrBÚformatr_) r—Zgrouped_by_dirÚdestfiler–Z script_nameZwarn_forÚ msg_linesZ dir_scriptsZsorted_scriptsZ start_textZ last_line_fmtr:r˜r;Ú!message_about_scripts_not_on_PATHÇsH   þ ÿ ÿÿÿÿrªcCst|dd„d�S)a; Return the given rows of a RECORD file in sorted order. Each row is a 3-tuple (path, hash, size) and corresponds to a record of a RECORD file (see PEP 376 and PEP 427 for details). For the rows passed to this function, the size can be an integer as an int or string, or the empty string. cSstdd„|DƒƒS)Ncss|]}t|ƒVqdSr€)rO)r‚Úxr:r:r;r…sz3sorted_outrows....)Útuple)Úrowr:r:r;Úóz sorted_outrows..)Úkey)r¦)Úoutrowsr:r:r;Úsorted_outrowssr²c CsÒg}|D]v}t|ƒdkr(t d |¡¡t|ƒ}|d}| ||¡}||d<||krpt|ƒ\} } | |d<| |d<| t|ƒ¡q|D]*} t| ƒ\} } | t | |ƒ| t | ƒf¡q„|D]} | || ddf¡q´|S)z_ :param installed: A map from archive RECORD path to installation RECORD path. rQz,RECORD line has more than three elements: {}rr1érT) rBÚloggerÚwarningr§ÚlistÚpoprPr¤r¬r<rO) Z old_csv_rowsÚ installedÚchangedÚ generatedÚlib_dirZinstalled_rowsr­Zold_pathÚnew_pathrLrFrGr:r:r;Úget_csv_rows_for_installeds*  ÿ   r½c@s eZdZdS)ÚMissingCallableSuffixN)Ú__name__Ú __module__Ú __qualname__r:r:r:r;r¾=sr¾cCs*t|ƒ}|dk r&|jdkr&tt|ƒƒ‚dSr€)rÚsuffixr¾rO)Ú specificationÚentryr:r:r;Ú_raise_for_invalid_entrypointAsrÅcseZdZd‡fdd„ Z‡ZS)ÚPipScriptMakerNcst|ƒtt|ƒ ||¡Sr€)rÅÚsuperrÆÚmake)ÚselfrÃZoptions©Ú __class__r:r;rÈHszPipScriptMaker.make)N)r¿rÀrÁrÈÚ __classcell__r:r:rÊr;rÆGsrÆFTc - sL|st|||||| d�}t|ˆ ƒr,|d‰n|d‰g‰g‰ˆ  tjj¡tjj} i‰tƒ‰g} |r²tƒ�4} t  ¡� t  d¡t j | ddd�W5QRXW5QRXt  |  ¡¡d-‡‡‡‡ fdd „ ‰d.‡‡‡‡fd d „ }|| ˆdƒtj ˆd d¡}t|ƒ\‰‰‡‡fdd„}ˆD]j}d }d }t tj ˆ |¡¡D]F}d }|dk�rPt}|}tj ˆ ||¡} ||}|| |d||d��q6�qtd |dƒ}d|_dh|_d|_g}ˆ dd ¡}|�r4dtjk�rÔ| d|¡tj dd¡dk�r| dtjd |f¡| dtƒ|f¡dd„ˆDƒ}|D] }ˆ|=�q&ˆ dd ¡}|�r”dtjk�r`| d|¡| dtƒ|f¡dd„ˆDƒ}|D] }ˆ|=�q†| dd „ˆ  ¡Dƒ¡d!d„ˆ  ¡Dƒ}g}z.| !|¡}|  |¡|  | !|d"di¡¡Wn>t"k �r.}z|j#d } t$d# %| ˆ¡ƒ‚W5d }~XYnX| �rRt&|ƒ}!|!d k �rRt  '|!¡tj ˆd d$¡}"tj ˆd d%¡}#t(|#d&ƒ�}$|$ )d'¡W5QRXt* +|#|"¡|  |"¡tj ˆd d(¡}%tj ˆd d)¡}&t,|%d*ƒ�\}'t,|&d+ƒ�F}(t- .|'¡})t/|)ˆˆ| ˆd,�}*t- 0|(¡}+t1|*ƒD]},|+ 2|,¡�qW5QRXW5QRXt* +|&|%¡d S)/zInstall a wheel)ÚuserÚhomeÚrootÚisolatedÚprefixZpurelibZplatlibÚignoreT)ÚforceÚquietFcs.t|ˆƒ}t|ˆƒ}|ˆ|<|r*ˆ |¡dS)z6Map archive RECORD paths to installation RECORD paths.N)r<r¡)Úsrcfiler¨ZmodifiedZoldpathÚnewpath)r¹r¸r»rwr:r;Úrecord_installeds   z*move_wheel_files..record_installedNcs¾t|ƒt |¡D�]¤\}}}|t|ƒd… tjj¡}tj ||¡} |rf| tjjd¡d  d¡rfq|D]d} tj ||| ¡} |r¢|dkr¢|   d¡r¢ˆ  | ¡qjqj|rj|   d¡rjt | ƒ  t ˆj ƒ¡rjˆ  | ¡qj|D]â} |ræ|| ƒræqÔtj || ¡} tj ||| ¡}t| ƒtj |¡�r$t |¡t | |¡t | ¡}ttdƒ�rZt ||j|jf¡t | tj¡�r˜t | ¡}|jtjBtjBtjB}t ||¡d}|�rª||ƒ}ˆ| ||ƒqÔqdS)Nr1rz.datarTz .dist-infoÚutimeF)rr3ÚwalkrBÚlstripr4r7r_r^Úendswithr¤rrfrWr†ÚunlinkÚshutilZcopyfileÚstatÚhasattrrØÚst_atimeÚst_mtimeÚaccessÚX_OKÚst_modeÚS_IXUSRÚS_IXGRPÚS_IXOTHÚchmod)ÚsourceÚdestZis_baseÚfixerÚfilterÚdirZsubdirsÚfilesZbasedirZdestdirr~Z destsubdirrGrÕr¨ÚstZ permissionsr¹)Ú data_dirsÚinfo_dirr×Úreqr:r;Úclobber‡sP ÿÿþ        ÿ z!move_wheel_files..clobberrzentry_points.txtcsh| ¡ d¡r|dd…}n<| ¡ d¡r8|dd…}n | ¡ d¡rT|dd…}n|}|ˆkpf|ˆkS)Nz.exeéüÿÿÿz -script.pyiöÿÿÿz.pya)rvrÛ)rWZ matchname)r�r�r:r;Úis_entrypoint_wrapperÕsz/move_wheel_files..is_entrypoint_wrapperr—)rërìrTZpipZENSUREPIP_OPTIONSzpip = Z altinstallz pip%s = %scSsg|]}t d|¡r|‘qS)zpip(\d(\.\d)?)?$©Úrert©r‚Úkr:r:r;r”0s z$move_wheel_files..Z easy_installzeasy_install = zeasy_install-%s = %scSsg|]}t d|¡r|‘qS)zeasy_install(-\d\.\d)?$rörør:r:r;r”@s css|]}d|VqdS)ú%s = %sNr:©r‚Zkvr:r:r;r…Gsz#move_wheel_files..cSsg|] }d|‘qS)rúr:rûr:r:r;r”Ksr�z­Invalid script entry point: {} for req: {} - A callable suffix is required. Cf https://packaging.python.org/en/latest/distributing.html#console-scripts for more information.Z INSTALLERz INSTALLER.piprcspip ZRECORDz RECORD.pipÚrzw+)r¸r¹rºr»)F)NN)3rr{rNr3r4r7ržrÚwarningsÚcatch_warningsÚfilterwarningsÚ compileallÚ compile_dirr´ÚdebugÚgetvaluer_r‘rrrorÆróZvariantsZset_moder·r¢r¤r‰rUrVrÚextendr¥Z make_multipler¾Úargsr r§rªrµrArlrÝÚmover[ÚcsvÚreaderr½Úwriterr²Zwriterow)-rWròrwrÍrÎrÏZ pycompileZschemerÐrÑZwarn_script_locationrérºÚstdoutróZep_filerõZdatadirrërìZsubdirrêZmakerZscripts_to_generateZ pip_scriptZpip_eprùZeasy_install_scriptZeasy_install_epZgui_scripts_to_generateZgenerated_console_scriptsÚerÄÚmsgZ installerZtemp_installerZinstaller_fileÚrecordZ temp_recordZ record_inZ record_outrr±r r­r:) r¹r�rðr�rñr¸r»r×ròrwr;Úmove_wheel_filesMsøþ    $F   #  ÿ ÿ   ÿÿÿÿ  ÿÿ  ÿ ýÿ        þ  "rcCsrzVdd„t d|¡Dƒd}| d¡}tƒ |¡}|d ¡}ttt|  d¡ƒƒ}|WSt k rlYdSXdS)z… Return the Wheel-Version of an extracted wheel, if possible. Otherwise, return None if we couldn't parse / extract it. cSsg|]}|‘qSr:r:)r‚Údr:r:r;r”‡sz!wheel_version..Nrrqz Wheel-VersionÚ.) rZ find_on_pathZ get_metadatarZparsestrr‡r¬ÚmapÚintr^Ú Exception)Ú source_dirZdistZ wheel_dataÚversionr:r:r;Ú wheel_versions   rcCsb|std|ƒ‚|dtdkr>td|d tt|ƒ¡fƒ‚n |tkr^t dd tt|ƒ¡¡dS)aê Raises errors or warns if called with an incompatible Wheel-Version. Pip should refuse to install a Wheel-Version that's a major series ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when installing a version only minor version ahead (e.g 1.2 > 1.1). version: a 2-tuple representing a Wheel-Version (Major, Minor) name: name of wheel or package to raise exception about :raises UnsupportedWheel: when an incompatible Wheel-Version is given z(%s is in an unsupported or invalid wheelrzB%s's Wheel-Version (%s) is not compatible with this version of piprz*Installing from a newer Wheel-Version (%s)N)r ÚVERSION_COMPATIBLEr_rrOr´rµ)rrWr:r:r;Úcheck_compatibility“sÿÿÿþrcCs d |¡S)z� Format three tags in the form "--". :param file_tag: A 3-tuple of tags (python_tag, abi_tag, platform_tag). r\)r_)Zfile_tagr:r:r;Ú format_tag±src@s>eZdZdZe dej¡Zdd„Zdd„Z dd„Z d d „Z d S) ÚWheelz A wheel filez�^(?P(?P.+?)-(?P.*?)) ((-(?P\d[^-]*?))?-(?P.+?)-(?P.+?)-(?P.+?) \.whl|\.dist-info)$cs¦ˆj |¡}|std|ƒ‚|ˆ_| d¡ dd¡ˆ_| d¡ dd¡ˆ_| d¡ˆ_| d¡  d¡ˆ_ | d ¡  d¡ˆ_ | d ¡  d¡ˆ_ ‡fd d „ˆj Dƒˆ_ d S)zX :raises InvalidWheelFilename: when the filename is invalid for a wheel z!%s is not a valid wheel filename.rWrpr\ZverÚbuildZpyverrZabiZplatcs.h|]&}ˆjD]}ˆjD]}|||f’qqqSr:)ÚabisÚplats)r‚r«ÚyÚz©rÉr:r;Ú Ýs ÿz!Wheel.__init__..N)Ú wheel_file_rertr rŒrur6rWrZ build_tagr^Z pyversionsrrÚ file_tags)rÉrŒZ wheel_infor:r r;Ú__init__Ès ÿ  ÿzWheel.__init__cCstdd„|jDƒƒS)zF Return the wheel's tags as a sorted list of strings. css|]}t|ƒVqdSr€)r©r‚Útagr:r:r;r…çsz0Wheel.get_formatted_file_tags..)r¦r#r r:r:r;Úget_formatted_file_tagsâszWheel.get_formatted_file_tagscst‡fdd„|jDƒƒS)aå Return the lowest index that one of the wheel's file_tag combinations achieves in the given list of supported tags. For example, if there are 8 supported tags and one of the file tags is first in the list, then return 0. :param tags: the PEP 425 tags to check the wheel against, in order with most preferred first. :raises ValueError: If none of the wheel's file tags match one of the supported tags. c3s |]}|ˆkrˆ |¡VqdSr€)Úindexr%©Útagsr:r;r…øsz*Wheel.support_index_min..)Úminr#©rÉr*r:r)r;Úsupport_index_minészWheel.support_index_mincCs|j |¡ S)z— Return whether the wheel is compatible with one of the given tags. :param tags: the PEP 425 tags to check the wheel against. )r#Ú isdisjointr,r:r:r;Ú supportedúszWheel.supportedN) r¿rÀrÁÚ__doc__r÷ÚcompileÚVERBOSEr"r$r'r-r/r:r:r:r;r»sürz([a-z0-9_.]+)-([a-z0-9_.!+-]+)cCst| |¡ƒS)zjDetermine whether the string looks like an egg_info. :param s: The string to parse. E.g. foo-2.1 )ÚboolÚsearch)r~Z _egg_info_rer:r:r;Ú_contains_egg_infosr5cCs�|jr dS|jr&|s"t d|j¡dS|s.dS|js:|js>dS||ƒsXt d|j¡dS|jrj|jjrjdS|j}|  ¡\}}|rŒt |ƒrŒdSdS)a[ Return whether to build an InstallRequirement object using the ephemeral cache. :param cache_available: whether a cache directory is available for the should_unpack=True case. :return: True or False to build the requirement with ephem_cache=True or False, respectively; or None not to build the requirement. Nz(Skipping %s, due to already being wheel.FzCSkipping wheel build for %s, due to binaries being disabled for it.T) Z constraintZis_wheelr´ÚinforWZeditablerÚlinkZis_vcsÚsplitextr5)ròÚ should_unpackÚcache_availableÚcheck_binary_allowedr7ÚbaseZextr:r:r;Úshould_use_ephemeral_cache s4ÿ þ  r=cCs^t|ƒ}d |¡}|s |d7}n:t ¡tjkr8|d7}n"| d¡sJ|d7}|d |t¡7}|S)z1 Format command information for logging. zCommand arguments: {} zCommand output: Nonez'Command output: [use --verbose to show]r|zCommand output: {}{})rr§r´ZgetEffectiveLevelÚloggingÚDEBUGrÛr)Ú command_argsÚcommand_outputZ command_descÚtextr:r:r;Úformat_command_resultGs    rCcCsxt|ƒ}|s4d |j¡}|t||ƒ7}t |¡dSt|ƒdkrfd |j|¡}|t||ƒ7}t |¡tj  ||d¡S)zH Return the path to the wheel in the temporary build directory. z1Legacy build of wheel for {!r} created no files. Nr1zZLegacy build of wheel for {!r} created more than one file. Filenames (choosing first): {} r) r¦r§rWrCr´rµrBr3r4r_)ÚnamesÚtemp_dirròr@rAr r:r:r;Úget_legacy_build_wheel_path^s$ ÿþ  ÿý rFcCsdS)NTr:)rpr:r:r;Ú _always_true~srGc@s\eZdZdZddd„Zddd„Zddd „Zd d „Zdd d „Zddd„Z dd„Z ddd„Z dS)Ú WheelBuilderz#Build wheels from a RequirementSet.NFcCsD|dkr t}||_||_|j|_|p&g|_|p0g|_||_||_dSr€) rGÚpreparerÚ wheel_cacheZwheel_download_dirÚ _wheel_dirÚ build_optionsÚglobal_optionsr;Úno_clean)rÉrIrJrLrMr;rNr:r:r;r$…s   zWheelBuilder.__init__c Cs.|j�|j|||d�W5QR£SQRXdS)ziBuild one wheel. :return: The filename of the built wheel, or None if the build failed. ©Ú python_tagN)Z build_envÚ_build_one_inside_env)rÉròÚ output_dirrPr:r:r;Ú _build_one�sÿzWheelBuilder._build_onec CsØtdd��Ä}|jr|j}n|j}|||j|d�}|dk r¶tj |¡}tj ||¡}zNt|ƒ\} } t   ||¡t   d|j || |  ¡¡t   d|¡|WW5QR£Stk r´YnX| |¡W5QR£dSQRXdS)Nry)ZkindrOz3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %s)rZ use_pep517Ú_build_one_pep517Ú_build_one_legacyr4r3r r_rIrÝrr´r6rWZ hexdigestrÚ _clean_one) rÉròrRrPrEZbuilderÚ wheel_pathÚ wheel_nameZ dest_pathZ wheel_hashrFr:r:r;rQ§s.    ý  z"WheelBuilder._build_one_inside_envcCst|j|jdd�S)NT)rMZunbuffered_output)rZ setup_py_pathrM)rÉròr:r:r;Ú_base_setup_argsÀs ýzWheelBuilder._base_setup_argsc CsÎ|jrt d|jf¡dSz~t d|¡td |j¡ƒ}|j}| |¡�|j ||j d�}W5QRX|r˜t ||ƒ}t   t j ||¡t j ||¡¡|}Wn$tk r¾t d|j¡YdSXt j ||¡S)z•Build one InstallRequirement using the PEP 517 build process. Returns path to wheel if successfully built. Otherwise, returns None. zGCannot build wheel for %s using PEP 517 when --build-options is presentNúDestination directory: %szBuilding wheel for {} (PEP 517))Úmetadata_directoryúFailed building wheel for %s)rLr´ÚerrorrWrrr§Zpep517_backendZsubprocess_runnerZ build_wheelr[rar3Úrenamer4r_r)rÉròÚtempdrPZrunnerZbackendrXÚnew_namer:r:r;rTËs6ÿ  ÿ þ   þzWheelBuilder._build_one_pep517c CsØ| |¡}d|jf}t|ƒ�°}t d|¡|dd|g|j}|dk rT|d|g7}zt||j|d�}Wn8tk r |  d¡t  d |j¡YW5QR£dSXt   |¡} t | ||||d �} | W5QR£SQRXdS) z–Build one InstallRequirement using the "legacy" build process. Returns path to wheel if successfully built. Otherwise, returns None. z Building wheel for %s (setup.py)rZZ bdist_wheelz-dNz --python-tag)ÚcwdÚspinnerr]r\)rDrEròr@rA)rYrWrr´rrLrZunpacked_source_directoryrZfinishr]r3rrrF) rÉròr_rPÚ base_argsZ spin_messagerbZ wheel_argsÚoutputrDrWr:r:r;rUòs8     ÿ ý   ûzWheelBuilder._build_one_legacycCsb| |¡}t d|j¡|ddg}zt||jd�WdStk r\t d|j¡YdSXdS)NzRunning setup.py clean for %sZcleanz--all)raTz Failed cleaning build dir for %sF)rYr´r6rWrrrr])rÉròrcZ clean_argsr:r:r;rVs  zWheelBuilder._clean_onec Csîg}t|jjƒ}|D]\}t||||jd�}|dkr4q|r\|rL|j |j¡}qb|j |j¡}n|j}|  ||f¡q|szgSt   dd  dd„|Dƒ¡¡d}|r¤t j}tƒ�ögg} } |D]à\}}z t|ƒWnFtk �r} z&t  d|j| ¡|   |¡WY¢qºW5d} ~ XYnX|j|||d�} | �r�|   |¡|�rš|j�rXt|jƒ�sXtd ƒ‚| ¡| |jj¡|_tt| ƒƒ|_t|jj|jƒqº|   |¡qºW5QRX| �rÈt   d d   d d„| Dƒ¡¡| �rêt   d d   dd„| Dƒ¡¡| S)aBuild wheels. :param should_unpack: If True, after building the wheel, unpack it and replace the sdist with the unpacked version in preparation for installation. :return: True if all the wheels built correctly. )r9r:r;Nz*Building wheels for collected packages: %sršcSsg|]\}}|j‘qSr:©rW)r‚ròrpr:r:r;r”\sz&WheelBuilder.build..z Building wheel for %s failed: %srOzbad source dir - missing markerzSuccessfully built %sr}cSsg|] }|j‘qSr:re©r‚ròr:r:r;r”•szFailed to build %scSsg|] }|j‘qSr:rerfr:r:r;r”šs) r3rJÚ cache_dirr=r;Zget_ephem_path_for_linkr7Zget_path_for_linkrKr¤r´r6r_r Zimplementation_tagrrÚOSErrorrµrWrSrrÚAssertionErrorZremove_temporary_sourceZensure_build_locationrIZ build_dirrrrZ file_path) rÉZ requirementsr9Zbuildsetr:ròZ ephem_cacherRrPZ build_successZ build_failurer Z wheel_filer:r:r;r#s” üÿþ   þ þ ÿþÿÿþþzWheelBuilder.build)NNNF)N)N)N)N)F) r¿rÀrÁr0r$rSrQrYrTrUrVrr:r:r:r;rH‚sù   ' %ýrH)r=)r=)FNNTNFNT)r0Z __future__rrœrrr@r>Zos.pathr3r÷rÝrÞrUrýÚbase64rZ email.parserrZ pip._vendorrZpip._vendor.distlib.scriptsrZpip._vendor.distlib.utilrZpip._vendor.packaging.utilsrZpip._vendor.sixr Z pip._internalr Zpip._internal.exceptionsr r r Zpip._internal.locationsrrZpip._internal.models.linkrZpip._internal.utils.loggingrZ pip._internal.utils.marker_filesrZpip._internal.utils.miscrrrZ$pip._internal.utils.setuptools_buildrZpip._internal.utils.subprocessrrrrZpip._internal.utils.temp_dirrZpip._internal.utils.typingrZpip._internal.utils.uirZpip._internal.utils.unpackingrZpip._internal.utils.urlsrÚtypingr r!r"r#r$r%r&r'r(r)r*r+Z"pip._vendor.packaging.requirementsr,Zpip._internal.req.req_installr-Z pip._internal.operations.preparer.Zpip._internal.cacher/Zpip._internal.pep425tagsr0rOZInstalledCSVRowr3ZBinaryAllowedPredicaterZ getLoggerr¿r´r<rIrPr[raror1r2rsr{r‘rªr²r½rr¾rÅrÆrrrrÚobjectrÚIr5r=rCrFrGrHr:r:r:r;Ús¦                  8          ÿ =$ õ 4 J ÿ :