+
    kGjr                        R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ]P                  ! ]4      tR R ltR R	 ltR
 R ltR# )z
Copy wheel license files into conda package info/licenses/ (CEP 34).

Only ``License-File`` entries from METADATA (PEP 639) are used. Wheels without
those lines get no ``info/licenses/`` content from this module.
)annotationsN)PackageMetadata)Path)FileDistributionc                    V ^8  d   QhRRRR/# )   bodystrreturnr    )formats   "8lib/python3.14/site-packages/conda_pypi/license_files.py__annotate__r      s     + +c +o +    c                ,    \        V 4      P                  # )z
Parse core metadata from the body of a ``METADATA`` file without reading
from the filesystem (e.g. ``WheelFile.read_dist_info('METADATA')``).
)r   metadata)r   s   &r   #package_metadata_from_metadata_bodyr      s    
 D!***r   c               $    V ^8  d   QhRRRRRR/# )r   dist_info_resolvedr   listed_pathr
   z
list[Path]r   )r   s   "r   r   r      s!      4 d z r   c                2    W,          V R,          V,          .# )aW  
Candidate paths for one ``License-File`` value (under this ``.dist-info`` only).

Tries ``.dist-info/<path>`` then ``.dist-info/licenses/<path>`` so both flat
layouts and PEP 639 ``licenses/`` trees work, including multi-segment paths
like ``docs/NOTICE``. Does not look under ``site-packages`` (avoids picking
another distribution's files).
licensesr   )r   r   s   &&r   _license_file_lookup_pathsr      s!     	(Z'+5 r   c               (    V ^8  d   QhRRRRRRRR/# )r   dist_info_dirr   info_dirr   r   r
   z	list[str]r   )r   s   "r   r   r   +   s0     3 333 3 	3r   c                f   V P                  4       p. p\        4       pVP                  R4      ;'       g    .  F  pVP                  4       pV'       g   K  \	        V4      pVP                  4       '       g   RVP                  9   d   \        R\        V4      : R24      h\        W84       FW  p	V	P                  4       '       g   K  V	P                  4       p
W9  g   K3  VP                  V
4       VP                  W34        K  	  \        P                  RVV 4       K  	  V'       g   . # VR,          pVP                  RRR7       . pV Fb  w  rW,          pVP                   P                  RRR7       \"        P$                  ! W4       VP                  R	VP'                  4        24       Kd  	  V# )
z
Copy ``License-File`` payloads from an installed wheel into
``<info_dir>/licenses/`` (conda package ``info/``).

Returns ``info/licenses/...`` paths relative to the package root (using
``/``), or an empty list if nothing resolved.
zLicense-Filez..zLicense-File z contains unsafe path segmentsz;License-File %r declared in metadata but not found under %sr   T)parentsexist_okzinfo/licenses/)resolvesetget_allstripr   is_absoluteparts
ValueErrorr	   r   is_fileaddappendlogwarningmkdirparentshutilcopy2as_posix)r   r   r   dist_resolvedresolvedseenraw_lineentryr   	candidate	canonicaldest_dir	rel_pathssrcdests   &&&            r   copy_into_info_licensesr;   +   s    "))+M(*HeD$$^4::: 5k""$$0A0A(A}S-=,@@^_``3MOI$$&&!))+I$# 89 P KKM! ;, 	*$HNN4$N/I$%$6S>+*>*>*@)ABC % r   )__doc__
__future__r   loggingr-   importlib.metadatar   pathlibr   conda_pypi.translater   	getLogger__name__r)   r   r   r;   r   r   r   <module>rD      s=    #   .  1!+3r   