o ai9 @ s d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ dgZe eZedejZed ejejB Zejdd ZG dd deZdS )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 @ s e Zd ZdZdddZdd Zdd Zd d Zddd Zdd Z dd Z dd Z dddZ dddZ dddZdd ZdS ) r z~A list of files built by on exploring the filesystem and filtered by applying various patterns to what we find there. Nc C s> t jt j|pt | _| jt j | _d| _t | _ dS )zd Initialise an instance. :param base: The base directory to explore under. N)ospathabspathnormpathgetcwdbasesepprefixallfilessetfiles)selfr r /builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/distlib/manifest.py__init__* s zManifest.__init__c C s ddl m}m}m} g | _}| j}|g}|j}|j}|rU| }t |} | D ])} tj || }t |}|j} || rD|t | q'|| rP|| sP|| q'|sdS 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 moder r r findall9 s&