JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-39.opt-1.pyc

a

[��f�/�@s�dZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZddl
mZmZddlmZmZddlmZddlmZmZddlmZmZdd	lmZdd
lmZddlm Z ddl!m"Z"dd
l#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*m+Z+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6e�7e8�Z9e�:dej;�Z<ee&ge=fZ>ee
e&e
e&fZ?e@e=d�dd�ZAe&e=e>e=d�dd�ZBe&e=d�dd�ZCe&e>e=d �d!d"�ZDe&ee=d�d#d$�ZEe&ee@d%�d&d'�ZFee=d(�d)d*�ZGe&e@dd+�d,d-�ZHe&e@e=e
e@e
e@e=ee@d.�d/d0�ZIe&e@e
e@e
e@e=ee@d1�d2d3�ZJe&e
e@e=d4�d5d6�ZKe	e&ee=e
e@e
e@e?d7�d8d9�ZLdS):z;Orchestrator for building wheels from InstallRequirements.
�N)�Any�Callable�Iterable�List�Optional�Tuple)�canonicalize_name�canonicalize_version)�InvalidVersion�Version)�
WheelCache)�InvalidWheelFilename�UnsupportedWheel)�FilesystemWheel�get_wheel_distribution)�Link)�Wheel)�build_wheel_pep517)�build_wheel_editable)�build_wheel_legacy)�InstallRequirement)�
indent_log)�
ensure_dir�	hash_file�is_wheel_installed)�make_setuptools_clean_args)�call_subprocess)�
TempDirectory)�path_to_url)�vcsz([a-z0-9_.]+)-([a-z0-9_.!+-]+))�s�returncCstt�|��S)zjDetermine whether the string looks like an egg_info.

    :param s: The string to parse. E.g. foo-2.1
    )�bool�_egg_info_re�search)r �r%�?/usr/lib/python3.9/site-packages/pip/_internal/wheel_builder.py�_contains_egg_info&sr')�req�
need_wheel�check_binary_allowedr!cCs�|jr
dS|jr&|r"t�d|j�dS|r.dS|js8dS|jrF|��S|jrPdS||�sjt�d|j�dSt	�s�t�d|j�dSdS)zBReturn whether an InstallRequirement should be built into a wheel.Fz(Skipping %s, due to already being wheel.TzCSkipping wheel build for %s, due to binaries being disabled for it.zOUsing legacy 'setup.py install' for %s, since package 'wheel' is not installed.)
Z
constraintZis_wheel�logger�info�name�
source_dir�editableZsupports_pyproject_editable�
use_pep517r)r(r)r*r%r%r&�
_should_build.s<���r1)r(r!cCst|dtd�S)NT�r)r*)r1�_always_true)r(r%r%r&�should_build_for_wheel_commandcsr4)r(r*r!cCst|d|d�S)NFr2)r1)r(r*r%r%r&� should_build_for_install_commandis�r5cCsd|js|jsdS|jrF|jjrFt�|jj�}|�|jj|j�rBdSdS|j�	�\}}t
|�r`dSdS)z�
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    FT)r/r.�linkZis_vcsrZget_backend_for_scheme�schemeZis_immutable_rev_checkout�url�splitextr')r(Zvcs_backend�base�extr%r%r&�
_should_cachersr<)r(�wheel_cacher!cCs4t|j�}|r$t|�r$|�|j�}n|�|j�}|S)zdReturn the persistent or temporary cache directory where the built
    wheel need to be stored.
    )r"�	cache_dirr<Zget_path_for_linkr6Zget_ephem_path_for_link)r(r=Zcache_availabler>r%r%r&�_get_cache_dir�s

r?)�_r!cCsdS)NTr%)r@r%r%r&r3�sr3)r(�
wheel_pathr!c	Cs�t|jp
d�}ttj�|��}t|j�|kr>td�||j���tt	|�|�}t
|j�}t|�t|j�krztd�||j���|j
}|dur�td��zt|�}Wn$ty�d|��}t|��Yn0|td�kr�t|jt�s�td�|���dS)N�z7Wheel has unexpected file name: expected {!r}, got {!r}zMissing Metadata-VersionzInvalid Metadata-Version: z1.2z6Metadata 1.2 mandates PEP 440 version, but {!r} is not)rr-r�os�path�basenamer
�formatrr�str�versionr	�metadata_versionrrr
�
isinstance)	r(rAZcanonical_name�wZdistZdist_verstrZmetadata_version_valuerI�msgr%r%r&�_verify_one�s<��
��
��rM)r(�
output_dir�verify�
build_options�global_optionsr/r!c	
Cs�|rdnd}zt|�Wn8tyP}z t�d||j|�WYd}~dSd}~00|j� t|||||�}Wd�n1s~0Y|r�|r�zt||�Wn<tt	fy�}z t�d||j|�WYd}~dSd}~00|S)zaBuild one wheel.

    :return: The filename of the built wheel, or None if the build failed.
    r/�wheelzBuilding %s for %s failed: %sNzBuilt %s for %s is invalid: %s)
r�OSErrorr+�warningr-Z	build_env�_build_one_inside_envrMr
r)	r(rNrOrPrQr/Zartifact�erAr%r%r&�
_build_one�s,�
�"rW)r(rNrPrQr/r!cCsptdd���N}|jrp|r&t�d|j�|r8t�d|j�|rVt|j|j|j|jd�}q�t	|j|j|j|jd�}nt
|j|j|j|||jd�}|du�r8t
j�|�}t
j�||�}zPt|�\}	}
t�||�t�d|j||
|	���t�d|�|WWd�St�y6}zt�d	|j|�WYd}~n
d}~00|j�sJt||�Wd�dS1�sb0YdS)
NrR)�kindz7Ignoring --global-option when building %s using PEP 517z6Ignoring --build-option when building %s using PEP 517)r-Zbackend�metadata_directory�tempd)r-�
setup_py_pathr.rQrPrZz3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %sz Building wheel for %s failed: %s)rr0r+rTr-rZpep517_backendrYrDrrr[Zunpacked_source_directoryrCrE�joinr�shutil�mover,Z	hexdigest�	Exception�_clean_one_legacy)r(rNrPrQr/Ztemp_dirrAZ
wheel_nameZ	dest_pathZ
wheel_hash�lengthrVr%r%r&rU�sn�����	
��
rU)r(rQr!cCsXt|j|d�}t�d|j�zt||jd�WdStyRt�d|j�YdS0dS)N)rQzRunning setup.py clean for %s)�cwdTz Failed cleaning build dir for %sF)	rr[r+r,r-rr.r_�error)r(rQZ
clean_argsr%r%r&r`1s�r`)�requirementsr=rOrPrQr!c
	Cs|sggfSt�dd�dd�|D���t��zgg}}|D]Z}t||�}t||||||job|j�}	|	r�tt	|	��|_
|j
j|_|�
|�q>|�
|�q>Wd�n1s�0Y|r�t�dd�dd	�|D���|r�t�d
d�dd	�|D���||fS)z�Build wheels.

    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    z*Building wheels for collected packages: %sz, css|]}|jVqdS)N�r-��.0r(r%r%r&�	<genexpr>R�zbuild.<locals>.<genexpr>NzSuccessfully built %s� cSsg|]
}|j�qSr%rerfr%r%r&�
<listcomp>orizbuild.<locals>.<listcomp>zFailed to build %scSsg|]
}|j�qSr%rerfr%r%r&rktri)r+r,r\rr?rWr/Zpermit_editable_wheelsrrr6Z	file_pathZlocal_file_path�append)
rdr=rOrPrQZbuild_successesZbuild_failuresr(r>Z
wheel_filer%r%r&�build@sD�


�
*��rm)M�__doc__ZloggingZos.pathrC�rer]�typingrrrrrrZpip._vendor.packaging.utilsrr	Zpip._vendor.packaging.versionr
rZpip._internal.cacherZpip._internal.exceptionsr
rZpip._internal.metadatarrZpip._internal.models.linkrZpip._internal.models.wheelrZ$pip._internal.operations.build.wheelrZ-pip._internal.operations.build.wheel_editablerZ+pip._internal.operations.build.wheel_legacyrZpip._internal.req.req_installrZpip._internal.utils.loggingrZpip._internal.utils.miscrrrZ$pip._internal.utils.setuptools_buildrZpip._internal.utils.subprocessrZpip._internal.utils.temp_dirrZpip._internal.utils.urlsrZpip._internal.vcsrZ	getLogger�__name__r+�compile�
IGNORECASEr#r"ZBinaryAllowedPredicateZBuildResultrGr'r1r4r5r<r?r3rMrWrUr`rmr%r%r%r&�<module>s� 
	�6��
�!��'�G�
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲR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