+
    <jX7                     R   R t ^ RIt^ RIt^ RIt^ RIt^ RIt^RIHt ^RIH	t	 ^RI
Ht R.t]P                  ! ]4      t]P                   ! R]P"                  4      t]P                   ! R]P"                  ]P&                  ,          4      t]P*                  R,          t ! R	 R]4      tR# )
zu
Class representing the list of files in a distribution.

Equivalent to distutils.filelist, but fixes some problems.
N)DistlibException)fsdecode)convert_pathManifestz\\w*
z#.*?(?=
)|
(?=$):N   Nc                      a  ] tR t^&t o RtRR ltR tR tR tRR lt	R t
R	 tR
 tRR ltRR ltRR ltR tRtV tR# )r   zt
A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.
Nc                :   \         P                  P                  \         P                  P                  T;'       g    \         P                  ! 4       4      4      V n        V P
                  \         P                  ,           V n        RV n        \        4       V n
        R# )zL
Initialise an instance.

:param base: The base directory to explore under.
N)ospathabspathnormpathgetcwdbasesepprefixallfilessetfiles)selfr   s   &&Q/opt/headortail/venv/lib/python3.14/site-packages/pip/_vendor/distlib/manifest.py__init__Manifest.__init__,   sY     GGOOBGG$4$4T5H5HRYY[$IJ	ii"&&(U
    c                    ^ RI HpHpHp . ;V n        pV P
                  pV.pVP                  pVP                  pV'       d   V! 4       p\        P                  ! V4      p	V	 F  p
\        P                  P                  WZ4      p\        P                   ! V4      pVP                  pV! V4      '       d   VP                  \        V4      4       Kn  V! V4      '       g   K~  V! V4      '       d   K  V! V4       K  	  K  R# )z]Find all files under the base and set ``allfiles`` to the absolute
pathnames of files found.
)S_ISREGS_ISDIRS_ISLNKN)statr   r   r   r   r   popappendr	   listdirr
   joinst_moder   )r   r   r   r   r   rootstackr   pushnamesnamefullnamer   modes   &             r   findallManifest.findall;   s     	32#%%yyii||5DJJt$E77<<3 wwx(||4==OOHX$67T]]74==N 	 r   c                   VP                  V P                  4      '       g+   \        P                  P	                  V P
                  V4      pV P                  P                  \        P                  P                  V4      4       R# )zb
Add a file to the manifest.

:param item: The pathname to add. This can be relative to the base.
N)	
startswithr   r	   r
   r!   r   r   addr   )r   items   &&r   r.   Manifest.addV   sN     t{{++77<<		40D

rww''-.r   c                :    V F  pV P                  V4       K  	  R# )zn
Add a list of files to the manifest.

:param items: The pathnames to add. These can be relative to the base.
N)r.   )r   itemsr/   s   && r   add_manyManifest.add_many`   s     DHHTN r   c                V  a a VV 3R lo\        S P                  4      pV'       dB   \        4       pV F)  pS! V\        P                  P	                  V4      4       K+  	  W#,          p\        R V 4       4       Uu. uF!  p\        P                  P                  ! V!  NK#  	  up# u upi )z(
Return sorted files in directory order
c                    < V P                  V4       \        P                  R V4       VSP                  8w  d5   \        P
                  P                  V4      w  r#VR9  g   Q hS! W4       R# R# )zadd_dir added %sN) /)r.   loggerdebugr   r	   r
   split)dirsdparent_add_dirr   s   &&  r   r@    Manifest.sorted.<locals>.add_dirn   sW    HHQKLL+Q/DII~GGMM!,	Y...% r   c              3   `   "   T F$  p\         P                  P                  V4      x  K&  	  R # 5iN)r	   r
   r;   ).0r
   s   & r   	<genexpr>"Manifest.sorted.<locals>.<genexpr>}   s      >vtrww}}T**vs   ,.)r   r   r	   r
   dirnamesortedr!   )r   wantdirsresultr<   f
path_tupler@   s   f&    @r   rH   Manifest.sortedi   s    
	& TZZ5Dbggooa01 NF>v>>@> /9j)>@ 	@ @s   <'B&c                2    \        4       V n        . V n        R# )zClear all collected files.N)r   r   r   )r   s   &r   clearManifest.clear   s    U
r   c                   V P                  V4      w  r#rEVR8X  d=   V F4  pV P                  VRR7      '       d   K  \        P                  RV4       K6  	  R# VR8X  d   V F  pV P	                  VRR7       K  	  R# VR8X  d=   V F4  pV P                  VRR7      '       d   K  \        P                  RV4       K6  	  R# VR	8X  d   V F  pV P	                  VRR7       K  	  R# VR
8X  d<   V F3  pV P                  WdR7      '       d   K  \        P                  RWd4       K5  	  R# VR8X  d   V F  pV P	                  WdR7       K  	  R# VR8X  d4   V P                  RVR7      '       g   \        P                  RV4       R# R# VR8X  d4   V P	                  RVR7      '       g   \        P                  RV4       R# R# \        RV,          4      h)aF  
Process a directive which either adds some files from ``allfiles`` to
``files``, or removes some files from ``files``.

:param directive: The directive to process. This should be in a format
             compatible with distutils ``MANIFEST.in`` files:

             http://docs.python.org/distutils/sourcedist.html#commands
includeT)anchorzno files found matching %rexcludeglobal-includeFz3no files found matching %r anywhere in distributionglobal-excluderecursive-include)r   z-no files found matching %r under directory %rrecursive-excludegraftNz no directories found matching %rprunez4no previously-included directories found matching %rzinvalid action %r)_parse_directive_include_patternr9   warning_exclude_patternr   )r   	directiveactionpatternsthedir
dirpatternpatterns   &&     r   process_directiveManifest.process_directive   s    04/D/DY/O,&
 Y#,,WT,BBNN#?I $ y #%%gd%; $ ''#,,WU,CCNN $>?FH $
 ''#%%ge%< $ **#,,W,DDNN $89@J $
 **#%%g%= $ w((j(AAA)+ B w((j(AA  -.8: B ##f,. .r   c                   VP                  4       p\        V4      ^8X  d!   V^ ,          R	9  d   VP                  ^ R4       V^ ,          pR;p;rVVR
9   dE   \        V4      ^8  d   \        RV,          4      hVR,           Uu. uF  p\	        V4      NK  	  ppMVR9   dW   \        V4      ^8  d   \        RV,          4      h\	        V^,          4      pVR,           Uu. uF  p\	        V4      NK  	  ppMNVR9   d6   \        V4      ^8w  d   \        RV,          4      h\	        V^,          4      pM\        RV,          4      hW4WV3# u upi u upi )z
Validate a directive.
:param directive: The directive to validate.
:return: A tuple of action, patterns, thedir, dir_patterns
rR   Nz$%r expects <pattern1> <pattern2> ...:   NNz*%r expects <dir> <pattern1> <pattern2> ...:r   NNz!%r expects a single <dir_pattern>zunknown action %r)rR   rT   rU   rV   rW   rX   rY   rZ   )rR   rT   rU   rV   )rW   rX   )rY   rZ   )r;   leninsertr   r   )r   r_   wordsr`   ra   rb   dir_patternwords   &&      r   r[   Manifest._parse_directive   sb    !u:?uQx 0B  B LLI&q*...6 : :5zA~&:VCE E 8=RyAytT*yHAHAA5zA~&@6IK K "%(+F7<RyAytT*yHAH))5zQ&7&@B B 'uQx0K ##6#?@@44) B Bs   E	 Ec                    RpV P                  WW44      pV P                  f   V P                  4        V P                   F9  pVP                  V4      '       g   K  V P                  P                  V4       RpK;  	  V# )a  Select strings (presumably filenames) from 'self.files' that
match 'pattern', a Unix-style wildcard (glob) pattern.

Patterns are not quite the same as implemented by the 'fnmatch'
module: '*' and '?'  match non-special characters, where "special"
is platform-dependent: slash on Unix; colon, slash, and backslash on
DOS/Windows; and colon on Mac OS.

If 'anchor' is true (the default), then the pattern match is more
stringent: "*.py" will match "foo.py" but not "foo/bar.py".  If
'anchor' is false, both of these will match.

If 'prefix' is supplied, then only filenames starting with 'prefix'
(itself a pattern) and ending with 'pattern', with anything in between
them, will match.  'anchor' is ignored in this case.

If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and
'pattern' is assumed to be either a string containing a regex or a
regex object -- no translation is done, the regex is just compiled
and used as-is.

Selected strings will be added to self.files.

Return True if files are found.
FT)_translate_patternr   r*   searchr   r.   )r   rd   rS   r   is_regexfound
pattern_rer'   s   &&&&&   r   r\   Manifest._include_pattern   sk    8 ,,WfO
 == LLNMMD  &&

t$ " r   c                    RpV P                  WW44      p\        V P                  4       F9  pVP                  V4      '       g   K  V P                  P	                  V4       RpK;  	  V# )a<  Remove strings (presumably filenames) from 'files' that match
'pattern'.

Other parameters are the same as for 'include_pattern()', above.
The list 'self.files' is modified in place. Return True if files are
found.

This API is public to allow e.g. exclusion of SCM subdirs, e.g. when
packaging source distributions
FT)rp   listr   rq   remove)r   rd   rS   r   rr   rs   rt   rK   s   &&&&&   r   r^   Manifest._exclude_pattern   s]     ,,WfO
djj!A  ##

!!!$ " r   c                   V'       d/   \        V\        4      '       d   \        P                  ! V4      # V# \        R8  d$   V P                  R4      P                  R4      w  rVpV'       dN   V P                  V4      p\        R8  d1   VP                  X4      '       d   VP                  X4      '       g   Q hMRp\        P                  ! \        P                  P                  V P                  R4      4      p	VEe<   \        R8:  d1   V P                  R4      p
V P                  V4      R\        V
4      )  pMhV P                  V4      pVP                  X4      '       d   VP                  X4      '       g   Q hV\        V4      \        V4      \        V4      ,
           p\        P                  p\        P                  R8X  d   Rp\        R8:  d*   RV	,           VP                  VRV,           34      ,           pMxV\        X4      \        V4      \        X4      ,
           pV: V	: V: V: RV: V: 2pM;V'       d4   \        R8:  d   RV	,           V,           pMX: V	: V\        V4      R : 2p\        P                  ! V4      # )	zTranslate a shell-like wildcard pattern to a compiled regular
expression.

Return the compiled regex.  If 'is_regex' true,
then 'pattern' is directly compiled to a regex (if it's a string)
or just returned as-is (assumes it's a regex object).
r?   r7   N\z\\^z.*)   r   )
isinstancestrrecompile_PYTHON_VERSION_glob_to_re	partitionr-   endswithescaper	   r
   r!   r   ri   r   )r   rd   rS   r   rr   startr?   endrt   r   empty_pattern	prefix_rer   s   &&&&&        r   rp   Manifest._translate_pattern4  s    '3''zz'**V# ,,S1;;C@MEc))'2J'!,,U33
8K8KC8P8PPPJyydii45&( $ 0 0 4 ,,V45Is=7I6IJ	 ,,V4	 ++E22y7I7I#7N7NNN%c%j#i.3s82KL	&&Cvv~&( 4Z#((I48:4E4G +H H
 (E
C
Oc#h4NO
27y#2<cC
 "f,!$tj!8J.3T:c%jk;R!SJzz*%%r   c                    \         P                  ! V4      p\        P                  p\        P                  R8X  d   RpRV,          p\        P
                  ! RWB4      pV# )zTranslate a shell-like glob pattern to a regular expression.

Return a string containing the regex.  Differs from
'fnmatch.translate()' in that '*' does not match "special characters"
(which are platform-specific).
r{   z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)fnmatch	translater	   r   r   sub)r   rd   rt   r   escapeds   &&   r   r   Manifest._glob_to_rek  sR     &&w/
 ff66T> Cs"VV17G
r   )r   r   r   r   rC   )F)TNF)__name__
__module____qualname____firstlineno____doc__r   r*   r.   r3   rH   rO   re   r[   r\   r^   rp   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r   &   sP     
	#6/@,
>.H-5^'R(5&n r   )r   r   loggingr	   r   sysr7   r   compatr   utilr   __all__	getLoggerr   r9   r   M_COLLAPSE_PATTERNS_COMMENTED_LINEversion_infor   objectr    r   r   <module>r      s   
   	 	 
    ,			8	$ JJz2440 **1244"$$;? ""2&Zv Zr   