ó
•abc @ sâ d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l
m Z d g Z e j
e ƒ Z e j d e j ƒ Z e j d e j e j Bƒ Z e j d
Z d e f d „ ƒ YZ d S( su
Class representing the list of files in a distribution.
Equivalent to distutils.filelist, but fixes some problems.
iÿÿÿÿNi ( t DistlibException( t fsdecode( t convert_patht Manifests \\w*
s #.*?(?=
)|
(?=$)i c B s› e Z d Z d
d „ Z d „ Z d „ Z d „ Z e d „ Z d „ Z
d „ Z d „ Z e
d
e d „ Z e
d
e d
„ Z e
d
e d „ Z d „ Z RS( s~ A list of files built by on exploring the filesystem and filtered by
applying various patterns to what we find there.
c C sY t j j t j j | p! t j ƒ ƒ ƒ | _ | j t j | _ d | _ t
ƒ | _ d S( sd
Initialise an instance.
:param base: The base directory to explore under.
N( t ost patht abspatht normpatht getcwdt baset sept prefixt Nonet allfilest sett files( t selfR ( ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyt __init__* s - c C sü d d l m } m } m } g | _ } | j } | g } | j } | j } x¨ | r÷ | ƒ } t j | ƒ } xƒ | D]{ }
t j
j | |
ƒ } t j | ƒ } | j }
| |
ƒ rÊ | j t
| ƒ ƒ qu | |
ƒ ru | |
ƒ ru | | ƒ qu qu WqP Wd S( sm Find all files under the base and set ``allfiles`` to the absolute
pathnames of files found.
iÿÿÿÿ( t S_ISREGt S_ISDIRt S_ISLNKN( t statR R R R
R t popt appendR t listdirR t joint st_modeR ( R R R R R
t roott stackR t pusht namest namet fullnameR t mode( ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyt findall9 s"
c C sM | j | j ƒ s- t j j | j | ƒ } n | j j t j j | ƒ ƒ d S( sz
Add a file to the manifest.
:param item: The pathname to add. This can be relative to the base.
N( t
startswithR R R R R R t addR ( R t item( ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyR$ T s c C s" x | D] } | j | ƒ q Wd S( s†
Add a list of files to the manifest.
:param items: The pathnames to add. These can be relative to the base.
N( R$ ( R t itemsR% ( ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyt add_many^ s
c sš ‡ ‡ f d † ‰ t ˆ j ƒ } | rg t ƒ } x' | D] } ˆ | t j j | ƒ ƒ q7 W| | O} n g t d „ | Dƒ ƒ D] } t j j | Œ ^ q~ S( s8
Return sorted files in directory order
c sX | j | ƒ t j d | ƒ | ˆ j k rT t j j | ƒ \ } } ˆ | | ƒ n d S( Ns add_dir added %s( R$ t loggert debugR R R t split( t dirst dt parentt _( t add_dirR ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyR/ l s
c s s! | ] } t j j | ƒ Vq d S( N( R R R* ( t .0R ( ( s@ /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pys