
    q"h+                        S r SSKrSSKrSSKrSSKrSSKJrJrJ	r	J
r
  SSKJrJr  SSKJrJr  SSKJr  SSKJrJr  SSKJrJr  SS	KJr  SS
KJr  SSKJr  SSKJ r   SSK!J"r"  SSK#J$r$  SSK%J&r&  SSK'J(r(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  \Rh                  " \55      r6\Rn                  " S\Rp                  5      r9\
\\$   \\$   4   r:S\;S\<4S jr=S\$S\<4S jr>S\$S\<4S jr?S\$S\	\<   4S jr@S\$S\S\;4S jrAS\$S \;SS4S! jrBS\$S"\;S#\<S$\\;   S%\\;   S&\<S\	\;   4S' jrCS\$S"\;S$\\;   S%\\;   S&\<S\	\;   4S( jrDS\$S%\\;   S\<4S) jrES*\\$   S\S#\<S$\\;   S%\\;   S\:4S+ jrFg),z:Orchestrator for building wheels from InstallRequirements.    N)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)make_setuptools_clean_args)call_subprocess)TempDirectory)path_to_url)vcsz([a-z0-9_.]+)-([a-z0-9_.!+-]+)sreturnc                 >    [        [        R                  U 5      5      $ )zbDetermine 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   s    M/var/www/html/env/lib/python3.13/site-packages/pip/_internal/wheel_builder.py_contains_egg_infor%   $   s    
 ##A&''    reqc                     U R                   (       a   eU R                  (       a  gU R                  (       d   eU R                  (       a  U R                  $ g)zBReturn whether an InstallRequirement should be built into a wheel.FT)
constraintis_wheel
source_direditablesupports_pyproject_editabler'   s    r$   _should_buildr/   ,   s=     ~~
||>>>
||...r&   c                     [        U 5      $ N)r/   r.   s    r$    should_build_for_install_commandr2   >   s     r&   c                 B   U R                   (       d  U R                  (       d  gU R                  (       a  U R                  R                  (       a  U R                   (       a   eU R                  (       d   e[        R
                  " U R                  R                  5      nU(       d   eUR                  U R                  R                  U R                  5      (       a  ggU R                  (       d   eU R                  R                  5       u  p#[        U5      (       a  gg)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+   linkis_vcsr   get_backend_for_schemeschemeis_immutable_rev_checkouturlsplitextr%   )r'   vcs_backendbaseexts       r$   _should_cacher>   D   s     ||3>>
xxCHHOO <<~~~00A{00s~~NN88O8!!#ID$ r&   wheel_cachec                     [        UR                  5      nU R                  (       d   eU(       a-  [        U 5      (       a  UR	                  U R                  5      nU$ UR                  U R                  5      nU$ )z\Return the persistent or temporary cache directory where the built
wheel need to be stored.
)r!   	cache_dirr4   r>   get_path_for_linkget_ephem_path_for_link)r'   r?   cache_availablerA   s       r$   _get_cache_dirrE   d   sd     ;001O88O8=--11#((;	   77A	r&   
wheel_pathc                    [        U R                  =(       d    S5      n[        [        R                  R                  U5      5      n[        UR                  5      U:w  a  [        SU< SUR                  < 35      e[        [        U5      U5      n[        UR                  5      n[        U5      [        UR                  5      :w  a  [        SU< SUR                  < 35      eUR                  nUc  [        S5      e [        U5      nU[        S5      :  a0  [!        UR                  [        5      (       d  [        SU< S35      eg g ! [         a    SU 3n[        U5      ef = f)	N z)Wheel has unexpected file name: expected z, got zMissing Metadata-VersionzInvalid Metadata-Version: z1.2z+Metadata 1.2 mandates PEP 440 version, but z is not)r   namer   ospathbasenamer   r   r   strversionr   metadata_versionr   r
   r	   
isinstance)	r'   rF   canonical_namewdistdist_verstrmetadata_version_valuerO   msgs	            r$   _verify_onerW   t   sb   &sxx~26Nbggz*+A N2"77I J66*
 	
 "/*"=~NDdll#KK(,@,KK"7 G99-!
 	
 "22%9::$"#9: 75>)*T\\72S2S9+P
 	
 3T)  $*+A*BCs##$s   E E'
output_dirverifybuild_optionsglobal_optionsr,   c                    U(       a  SOSn [        U5        U R
                     [        XX4U5      nSSS5        W(       a  U(       a   [        X5        U$ U$ ! [         a,  n[        R                  SUU R                  U5         SnAgSnAff = f! , (       d  f       Ne= f! [        [        4 a+  n[        R                  SX`R                  U5         SnAgSnAff = f)zYBuild one wheel.

:return: The filename of the built wheel, or None if the build failed.
r,   wheelzBuilding %s for %s failed: %sNzBuilt %s for %s is invalid: %s)
r   OSErrorloggerwarningrI   	build_env_build_one_inside_envrW   r   r   )	r'   rX   rY   rZ   r[   r,   artifacterF   s	            r$   
_build_onere      s     &z7H	: 
*]H

 
 f	( :)  +HH		
  
 %&67 	NN;XxxQRS	s:   A B	B" 
B""B		B
B"C2!CCc           
         [        SS9 nU R                  (       d   eU R                  (       a  U R                  (       d   eU R                  (       d   eU(       a   [
        R                  SU R                  5        U(       a   [
        R                  SU R                  5        U(       a5  [        U R                  U R                  U R                  UR                  S9nOk[        U R                  U R                  U R                  UR                  S9nO6[        U R                  U R                  U R                  UUUR                  S9nUb  [        R                  R                  U5      n[        R                  R                  X5      n [!        U5      u  p["        R$                  " Xh5        [
        R'                  SU R                  UU
U	R)                  5       5        [
        R'                  SU5        UsS S S 5        $ U R                  (       d  [-        X5         S S S 5        g ! [*         a+  n[
        R                  S	U R                  U5         S nANVS nAff = f! , (       d  f       g = f)
Nr]   )kindz7Ignoring --global-option when building %s using PEP 517z6Ignoring --build-option when building %s using PEP 517)rI   backendmetadata_directorytempd)rI   setup_py_pathr+   r[   rZ   rj   z3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %sz Building wheel for %s failed: %s)r   rI   
use_pep517ri   pep517_backendr_   r`   r   rK   r   r   rk   unpacked_source_directoryrJ   rL   joinr   shutilmoveinfo	hexdigest	Exception_clean_one_legacy)r'   rX   rZ   r[   r,   temp_dirrF   
wheel_name	dest_path
wheel_hashlengthrd   s               r$   rb   rb      s    
G	$xxx>>))))%%%%Msxx Lchh 1..'*'='="--	
 0..'*'='="--	
 ,XX!//88-+mmJ !))*5JZ<I%.z%:"
J2IHH((* 5zB g 
%	$v ~~c2{ 
%	$h  6HH i 
%	$s7   FIA+H'I'
I1!IIII
I-c                     [        U R                  US9n[        R                  SU R                  5         [        USU R                  S9  g! [         a#    [        R                  SU R                  5         gf = f)N)r[   zRunning setup.py clean for %szpython setup.py clean)command_desccwdTz Failed cleaning build dir for %sF)	r   rk   r_   rr   rI   r   r+   rt   error)r'   r[   
clean_argss      r$   ru   ru      sp    +%J
 KK/:%<#..	
  7Bs   A *A98A9requirementsc                    U (       d  / / 4$ [         R                  SSR                  S U  5       5      5        [        5          / / peU  H  nUR                  (       d   e[        Xq5      n[        UUUUUUR                  =(       a    UR                  5      n	U	(       a  UR                  b  UR                  XR                  5        [        [        U	5      5      Ul        UR                  R                  Ul        UR                  R                   (       d   eUR#                  U5        M  UR#                  U5        M     SSS5        W(       a?  [         R                  SSR                  U Vs/ s H  owR                  PM     sn5      5        W(       a?  [         R                  SSR                  U Vs/ s H  owR                  PM     sn5      5        XV4$ ! , (       d  f       N= fs  snf s  snf )zBuild 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, c              3   8   #    U  H  oR                   v   M     g 7fr1   )rI   ).0r'   s     r$   	<genexpr>build.<locals>.<genexpr>!  s     3ls((ls   NzSuccessfully built %s zFailed to build %s)r_   rr   ro   r   rI   rE   re   r,   permit_editable_wheelsdownload_inforecord_download_originr   r   r4   	file_pathlocal_file_pathr*   append)
r   r?   rY   rZ   r[   build_successesbuild_failuresr'   rA   
wheel_files
             r$   buildr     s    2v KK4		3l33
 
*,bC88O8&s8I#;!;!;J $$0  66yBSBSTJ 78&)hh&8&8#xx((((&&s+%%c*1   
: #HH/:/3hh/:;	
  HH.9.3hh.9:	

 **Q 
@ ;
 :s   C<G,G&2G+
G#)G__doc__loggingos.pathrJ   rerp   typingr   r   r   r   pip._vendor.packaging.utilsr   r   pip._vendor.packaging.versionr	   r
   pip._internal.cacher   pip._internal.exceptionsr   r   pip._internal.metadatar   r   pip._internal.models.linkr   pip._internal.models.wheelr   $pip._internal.operations.build.wheelr   -pip._internal.operations.build.wheel_editabler   +pip._internal.operations.build.wheel_legacyr   pip._internal.req.req_installr   pip._internal.utils.loggingr   pip._internal.utils.miscr   r   $pip._internal.utils.setuptools_buildr   pip._internal.utils.subprocessr   pip._internal.utils.temp_dirr   pip._internal.utils.urlsr   pip._internal.vcsr   	getLogger__name__r_   compile
IGNORECASEr"   BuildResultrM   r!   r%   r/   r2   r>   rE   rW   re   rb   ru   r    r&   r$   <module>r      s0   @   	  2 2 O A * K J * , C N J < 2 : K : 6 0 !			8	$zz;R]]KD+,d3E.FFG(# ($ (		$			d^@	 	 
' 
S 
T 
:#	## # 9	#
 I# # c]#LD	DD 9D I	D
 D c]DN- tCy T "=+-.=+=+ =+ 9	=+
 I=+ =+r&   