
    4Քh(                        S SK Jr  S SK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  \(       a  S S
KJr  \R$                  " \5      r " S S\
5      rg)    )annotationsN)Iterable)TYPE_CHECKING)BuildEnvironment)AbstractDistribution)InstallationError)BaseDistribution)runner_with_spinner_message)BuildEnvironmentInstallerc                      \ rS rSrSr\SS j5       rSS jr        SS jr    SS jr	SS jr
SS jr    SS	 jr      SS
 jrSS jrSrg)SourceDistribution   zRepresents a source distribution.

The preparation step for these needs metadata for the packages to be
generated, either using PEP 517 or using the legacy `setup.py egg_info`.
c                |    U R                   R                  (       d   eU R                   R                  R                  $ )z/Identify this requirement uniquely by its link.)reqlinkurl_without_fragmentselfs    Y/var/www/auris/envauris/lib/python3.13/site-packages/pip/_internal/distributions/sdist.pybuild_tracker_id#SourceDistribution.build_tracker_id   s(     xx}}}xx}}111    c                6    U R                   R                  5       $ )N)r   get_distr   s    r   get_metadata_distribution,SourceDistribution.get_metadata_distribution    s    xx  ""r   c                b   U R                   R                  5         U R                   R                  =(       a    UnU(       a<  U R                  U5        U R                   R	                  5         U R                  U5        U R                   R                  =(       a    UnU(       as  U R                   R                  nUc   eU R                   R                  R                  U5      u  pxU(       a  U R                  SU5        U(       a  U R                  U5        U R                   R                  5         g )Nthe backend dependencies)r   load_pyproject_toml
use_pep517_prepare_build_backendisolated_editable_sanity_check_install_build_reqspyproject_requires	build_envcheck_requirements_raise_conflicts_raise_missing_reqsprepare_metadata)	r   build_env_installerbuild_isolationcheck_build_depsshould_isolateshould_check_depsr$   conflictingmissings	            r   prepare_distribution_metadata0SourceDistribution.prepare_distribution_metadata#   s     	$$& ,,@ ''(;< HH335$$%89 HH//D4D!%!<!<%111#'88#5#5#H#H"$ K %%&@+N((1!!#r   c                >   U R                   R                  nUc   e[        U5      U R                   l        U R                   R                  R	                  USSU R                   S9  U R                   R                  R                  U R                   R                  5      u  p4U(       a  U R                  SU5        U(       a]  [        R                  SU R                   5        [        R                  SSR                  [        [        [        U5      5      5      5        g g )Noverlayzbuild dependencieskindfor_reqz"PEP 517/518 supported requirementsz4Missing build requirements in pyproject.toml for %s.z`The project does not specify a build backend, and pip cannot fall back to setuptools without %s.z and )r   r$   r   r%   install_requirementsr&   requirements_to_checkr'   loggerwarningjoinmapreprsorted)r   r*   r$   r/   r0   s        r   r!   )SourceDistribution._prepare_build_backendJ   s    
 "XX88!----.AB//	0Ddhh 	0 	
  $xx11DDHH** 
 !!"FTNNF NNASvg78 r   c                <   U R                   R                     [        S5      nU R                   R                  nUc   eUR	                  U5         UR                  5       sS S S 5        sS S S 5        $ ! , (       d  f       O= f S S S 5        g ! , (       d  f       g = f)Nz#Getting requirements to build wheel)r   r%   r
   pep517_backendsubprocess_runnerget_requires_for_build_wheelr   runnerbackends      r   _get_build_requires_wheel,SourceDistribution._get_build_requires_wheelf   sw    XX01VWFhh--G&&&**62;;= 32	   322	  #   8BA2	B2
B 	<B
Bc                <   U R                   R                     [        S5      nU R                   R                  nUc   eUR	                  U5         UR                  5       sS S S 5        sS S S 5        $ ! , (       d  f       O= f S S S 5        g ! , (       d  f       g = f)Nz&Getting requirements to build editable)r   r%   r
   rB   rC   get_requires_for_build_editablerE   s      r   _get_build_requires_editable/SourceDistribution._get_build_requires_editablen   s{    XX08F hh--G&&&**62>>@ 32   322  rJ   c                   U R                   R                  (       aG  U R                   R                  (       a,  U R                   R                  (       a  U R	                  5       nOU R                  5       nU R                   R                  R                  U5      u  p4U(       a  U R                  SU5        U R                   R                  R                  USSU R                   S9  g )Nr   normalzbackend dependenciesr5   )
r   editablepermit_editable_wheelssupports_pyproject_editablerM   rH   r%   r&   r'   r8   )r   r*   
build_reqsr/   r0   s        r   r#   &SourceDistribution._install_build_reqsx   s     HH//44::<J779J#xx11DDZP!!"<kJ//X$:DHH 	0 	
r   c           
         SnUR                  U R                  USR                  S [        U5       5       5      S9n[	        U5      e)NzZSome build dependencies for {requirement} conflict with {conflicting_with}: {description}., c              3  4   #    U  H  u  pU S U 3v   M     g7f)z is incompatible with N ).0	installedwanteds      r   	<genexpr>6SourceDistribution._raise_conflicts.<locals>.<genexpr>   s&      ")A%I +3F8<)As   )requirementconflicting_withdescription)formatr   r<   r?   r   )r   r`   conflicting_reqsformat_stringerror_messages        r   r'   #SourceDistribution._raise_conflicts   sY    ? 	 &,,-		 ")/0@)A"  - 
  ..r   c                    SnUR                  U R                  SR                  [        [        [        U5      5      5      S9n[        U5      e)NzASome build dependencies for {requirement} are missing: {missing}.rW   )r_   r0   )rb   r   r<   r=   r>   r?   r   )r   r0   rd   re   s       r   r(   &SourceDistribution._raise_missing_reqs   sK    O 	 &,,$))CfWo4N*O - 
  ..r   rY   N)returnz
str | None)ri   r	   )r*   r   r+   boolr,   rj   ri   None)r*   r   ri   rk   )ri   zIterable[str])r`   strrc   zset[tuple[str, str]]ri   rk   )r0   zset[str]ri   rk   )__name__
__module____qualname____firstlineno____doc__propertyr   r   r1   r!   rH   rM   r#   r'   r(   __static_attributes__rY   r   r   r   r      s     2 2
#%$6%$ %$ 	%$
 
%$N#<	8>A
#<
	
*/ #/7K/	/"/r   r   )
__future__r   loggingcollections.abcr   typingr   pip._internal.build_envr    pip._internal.distributions.baser   pip._internal.exceptionsr   pip._internal.metadatar	   pip._internal.utils.subprocessr
   r   	getLoggerrm   r:   r   rY   r   r   <module>r~      sE    "  $   4 A 6 3 FA			8	$R/- R/r   