/usr/local/lib/python3.6/site-packages/distlib/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/distlib/__pycache__/manifest.cpython-36.pyc (10307B)
3
0DgX7 @ s d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ dgZej
eZejdejZejd 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)fsdecode)convert_pathManifestz\\w*
z#.*?(?=
)|
(?=$) c @ sz e Zd ZdZdddZdd Zdd Zd d
Zddd
Zdd Z dd Z
dd ZdddZd ddZ
d!ddZdd ZdS )"r z
A list of files built by exploring the filesystem and filtered by applying various
patterns to what we find there.
Nc C s> t jjt jj|pt j | _| jt j | _d| _t | _
dS )zd
Initialise an instance.
:param base: The base directory to explore under.
N)ospathabspathnormpathgetcwdbasesepprefixallfilessetfiles)selfr
r :/usr/local/lib/python3.6/site-packages/distlib/manifest.py__init__, s zManifest.__init__c C s ddl m}m}m} g | _}| j}|g}|j}|j}xv|r| }tj |} x\| D ]T}
tj
j||
}tj |}|j}
||
r|jt
| qR||
rR||
rR|| qRW q8W 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 findall; s"
zManifest.findallc C s4 |j | jstjj| j|}| jjtjj| 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 itemr r r r) V s zManifest.addc C s x|D ]}| j | qW 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 itemsr* r r r add_many` s
zManifest.add_manyFc sf fdd t j}|rJt }x|D ]} |tjj| q(W ||O }dd tdd |D D S )z8
Return sorted files in directory order
c sJ | j | tjd| |jkrFtjj|\}}|dks