{eK d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ dgZ ej
e Z ej dej Z ej d ej ej z Zej dd
Z G d de ZdS )zu
Class representing the list of files in a distribution.
Equivalent to distutils.filelist, but fixes some problems.
N )DistlibException)fsdecodeconvert_pathManifestz\\w*
z#.*?(?=
)|
(?=$) c p e Zd ZdZddZd Zd Zd ZddZd Z d
Z
d Z dd
Z ddZ
ddZd ZdS )r z
A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.
Nc t j t j |pt j | _ | j t j z | _ d| _ t | _
dS )zd
Initialise an instance.
:param base: The base directory to explore under.
N)ospathabspathnormpathgetcwdbasesepprefixallfilessetfiles)selfr s b/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/distlib/manifest.py__init__zManifest.__init__, sZ GOOBG$4$4T5HRY[[$I$IJJ i"&(
UU
c ddl m}m}m} g x| _ }| j }|g}|j }|j }|r | }t j | } | D ]}
t j
||
}t j | }|j }
||
r#| t | k ||
r ||
s || |dS dS )zmFind all files under the base and set ``allfiles`` to the absolute
pathnames of files found.
r )S_ISREGS_ISDIRS_ISLNKN)statr r r r r popappendr listdirr
joinst_moder )r r r r r rootstackr pushnamesnamefullnamer modes r findallzManifest.findall; s 3222222222#%%
yi|
#355DJt$$E
#
#7<<d33 wx((|74== #OOHX$6$67777WT]] #774== #DNNN
#
#
#
#
#r c | | j s%t j | j | }| j t j | dS )zz
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/ zManifest.addV s[ t{++ 17<< 400D
rw''--.....r c : |D ]}| | dS )z
Add a list of files to the manifest.
:param items: The pathnames to add. These can be relative to the base.
N)r/ )r itemsr0 s r add_manyzManifest.add_many` s. DHHTNNNN r Fc fdt j }|rAt }|D ]+} |t j | ,||z }d t d |D D S )z8
Return sorted files in directory order
c | | t d| |j k r6t j | \ }}|dvsJ | | d S d S )Nzadd_dir added %s) /)r/ loggerdebugr r r
split)dirsdparent_add_dirr s r r? z Manifest.sorted.