abcF@@s dZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZyddlZWnek rEddlZnXddlmZddlmZm Z m!Z!ddlm"Z"y&ddlm#Z#m$Z$m%Z%e&Z'Wnek re(Z'nXdd lm)Z*dd l+m,Z,m-Z-yddl.j/Z0e0j1Wnek re2Z0nXdd lm3Z3dd lm4Z4e5d e5de5de5dddfej6koddfknrdZ7e j8e7ne2Z9e2Z:de;fdYZ<de=fdYZ>de>e4j?j@fdYZAde>e4j?jBfdYZCdZDiZEdZFdZGdZHdZId ZJd!ZKd"ZLd#ZMZNd$ZOd%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDddEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdigFZPd@eQfdjYZRdAeRfdkYZSdleSfdmYZTdBeRfdnYZUdCeRfdoYZViZWej?d ZXdZYdpZZdqZ[dZ\drZ]dsZ^dtZ_gduZ`dvZadwZbejcdxZdejcdyZeebZfdzZgd{ZhehZid|Zjd}Zke2d~ZldZmdXfdYZndYenfdYZod;e=fdYZpdeqfdYZrd:e=fdYZsesZtdDeufdYZvd<fdYZwdZxdZydZzdZ{dZ|dZ}e2dZ~d_fdYZe^e=ed`efdYZdaefdYZejd]efdYZeZdeqfdYZdefdYZde jfdYZdbefdYZe^e jedZefdYZd[efdYZd\efdYZeFddidZe(dZe(dZee jee(dZee=edZe(dZeejeee0dr(ee0jeneFddieFddidZdZdZdZe2dZdZeejeee jeee0dree0jendZee=edZidZdZdZdZejcdjZejcdejejBjZd?e=fdYZdZdZd=e=fdYZdefdYZdefdYZied6ed6ed6ZdZdefdYZdZd>e4jjfdYZdZdZdZdZdZdZe jdde<de&dZeedZedZdS(sZ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipulate resource names being passed into the API. The package resource API is designed to work with normal filesystem packages, .egg files, and unpacked .egg files. It can also work in a limited way with .zip files and with custom PEP 302 loaders that support the ``get_data()`` method. i(tabsolute_importN(t get_importer(tsix(turllibtmaptfilter(tutime(tmkdirtrenametunlink(topen(tisdirtsplit(tappdirs(t packagingspip._vendor.packaging.versions pip._vendor.packaging.specifierss"pip._vendor.packaging.requirementsspip._vendor.packaging.markersisLSupport for Python 3.0-3.2 has been dropped. Future versions will fail here.t PEP440WarningcB@seZdZRS(sa Used when there is an issue with a version or specifier not complying with PEP 440. (t__name__t __module__t__doc__(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR[st_SetuptoolsVersionMixincB@sYeZdZdZdZdZdZdZdZdZ dZ RS( cC@stt|jS(N(tsuperRt__hash__(tself((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRcscC@s9t|trt||kStt|j|SdS(N(t isinstancettupleRRt__lt__(Rtother((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRfscC@s9t|trt||kStt|j|SdS(N(RRRRt__le__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRlscC@s9t|trt||kStt|j|SdS(N(RRRRt__eq__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRrscC@s9t|trt||kStt|j|SdS(N(RRRRt__ge__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRxscC@s9t|trt||kStt|j|SdS(N(RRRRt__gt__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR~scC@s9t|trt||kStt|j|SdS(N(RRRRt__ne__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@st||S(N(R(Rtkey((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt __getitem__sc#@stjdtjidd6dd6dd6dd6dd 6jfd fd }tjd td dx|t|D] }|VqWdS(Ns(\d+ | [a-z]+ | \.| -)tctpretpreviewsfinal-t-trct@tdevc3@suxij|D]X}||}| s|dkr>qn|d dkr_|jdVqd|VqWdVdS(Nt.it 0123456789it*s*final(R tzfill(tstpart(t component_retreplace(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_parse_version_partss c@sg}x|jD]}|jdr|dkrdx'|r`|ddkr`|jq=Wnx'|r|ddkr|jqgWn|j|qWt|S(NR+s*finalis*final-t00000000(tlowert startswithtpoptappendR(R-tpartsR.(R1(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytold_parse_versions sYou have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.t stackleveli(tretcompiletVERBOSEtgettwarningstwarntRuntimeWarningtstr(RR8R.((R1R/R0sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__iter__s ( RRRRRRRRRR!RB(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRbs        tSetuptoolsVersioncB@seZRS((RR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRCstSetuptoolsLegacyVersioncB@seZRS((RR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRDscC@s3yt|SWntjjk r.t|SXdS(N(RCRtversiontInvalidVersionRD(tv((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt parse_versionscK@s-tj|tjtj||dS(N(tglobalstupdatet _state_varstdicttfromkeys(tvartypetkw((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_declare_statescC@sLi}t}x6tjD](\}}|d|||||tcC@s{t}tj|}|dk rwtjdkrwy-ddjtd |jdf}Wqwt k rsqwXn|S(sZReturn this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version of Mac OS X that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the version of Mac OS X that we are *running*. To allow usage of packages that explicitly require a newer version of Mac OS X, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its platform strings, this function should be extended accordingly. tdarwins macosx-%s-%sR)iiN( tget_build_platformtmacosVersionStringtmatchRatsystplatformtjoint _macosx_verstgroupt ValueError(tplattm((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_supported_platforms - trequiret run_scriptt get_providertget_distributiontload_entry_pointt get_entry_maptget_entry_infotiter_entry_pointstresource_stringtresource_streamtresource_filenametresource_listdirtresource_existstresource_isdirtdeclare_namespacet working_settadd_activation_listenertfind_distributionstset_extraction_pathtcleanup_resourcestget_default_cachet Environmentt WorkingSettResourceManagert Distributiont Requirementt EntryPointtResolutionErrortVersionConflicttDistributionNotFoundt UnknownExtratExtractionErrortparse_requirementsRHt safe_namet safe_versiont get_platformtcompatible_platformst yield_linestsplit_sectionst safe_extrat to_filenametinvalid_markertevaluate_markertensure_directorytnormalize_pathtEGG_DISTt BINARY_DISTt SOURCE_DISTt CHECKOUT_DISTt DEVELOP_DISTtIMetadataProvidertIResourceProvidert FileMetadatat PathMetadatat EggMetadatat EmptyProvidertempty_providert NullProvidert EggProvidertDefaultProvidert ZipProvidertregister_findertregister_namespace_handlertregister_loader_typetfixup_namespace_packagesRtrun_maintAvailableDistributionscB@seZdZdZRS(s.Abstract base for dependency resolution errorscC@s|jjt|jS(N(t __class__RtreprRb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__repr__Is(RRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRFscB@sDeZdZdZedZedZdZdZRS(s An already-installed version conflicts with the requested version. Should be initialized with the installed Distribution and the requested Requirement. s3{self.dist} is installed but {self.req} is requiredcC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytdistWscC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytreq[scC@s|jjtS(N(t _templatetformattlocals(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytreport_scC@s$|s |S|j|f}t|S(st If required_by is non-empty, return a version of self that is a ContextualVersionConflict. (RbtContextualVersionConflict(Rt required_byRb((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt with_contextbs( RRRRtpropertyRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRMs  RcB@s*eZdZejdZedZRS(s A VersionConflict that accepts a third parameter, the set of the requirements that required the installed Distribution. s by {self.required_by}cC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRus(RRRRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRms cB@sSeZdZdZedZedZedZdZdZ RS(s&A requested distribution was not foundsSThe '{self.req}' distribution was not found and is required by {self.requirers_str}cC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt requirersscC@s|js dSdj|jS(Nsthe applications, (RRk(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt requirers_strs cC@s|jjtS(N(RRR(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s |jS(N(R(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__str__s( RRRRRRRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRzs cB@seZdZRS(s>Distribution doesn't have an "extra feature" of the given name(RRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRsiiicC@s|t|scB@s>eZdZdZdZdZdZdZRS(cC@sdS(s;Does the package's distribution contain the named metadata?N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt has_metadataDRdcC@sdS(s'The named metadata resource as a stringN((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt get_metadataGRdcC@sdS(sYield named metadata resource as list of non-blank non-comment lines Leading and trailing whitespace is stripped from each line, and lines with ``#`` as the first non-blank character are omitted.N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_metadata_linesJRdcC@sdS(s>Is the named metadata a directory? (like ``os.path.isdir()``)N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytmetadata_isdirPRdcC@sdS(s?List of metadata names in the directory (like ``os.listdir()``)N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytmetadata_listdirSRdcC@sdS(s=Execute the named script in the supplied namespace dictionaryN((Rt namespace((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRsVRd(RRRRRRRRs(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRCs      cB@sDeZdZdZdZdZdZdZdZRS(s3An object that provides access to package resourcescC@sdS(sdReturn a true filesystem path for `resource_name` `manager` must be an ``IResourceManager``N((tmanagert resource_name((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_resource_filename]RdcC@sdS(siReturn a readable file-like object for `resource_name` `manager` must be an ``IResourceManager``N((RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_resource_streambRdcC@sdS(smReturn a string containing the contents of `resource_name` `manager` must be an ``IResourceManager``N((RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_resource_stringgRdcC@sdS(s,Does the package contain the named resource?N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt has_resourcelRdcC@sdS(s>Is the named resource a directory? (like ``os.path.isdir()``)N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRoRdcC@sdS(s?List of resource names in the directory (like ``os.listdir()``)N((R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR}rRd( RRRRRRRRR}(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRZs     cB@seZdZddZedZedZdZdZ dZ ddZ dZ d Z deed Zdded Zdded Zd ZedZdZdZdZRS(sDA collection of active distributions on sys.path (or a similar list)cC@s^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|qCWdS(s?Create working set from list of path entries (default=sys.path)N(tentriest entry_keystby_keyt callbacksRaRiRt add_entry(RRtentry((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__init__ys       cC@se|}yddlm}Wntk r1|SXy|j|Wntk r`|j|SX|S(s1 Prepare the master working set. i(t __requires__(t__main__RRRrRt_build_from_requirements(tclstwsR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt _build_masters   cC@s|g}t|}|j|t}x|D]}|j|q4Wx0tjD]%}||jkrU|j|qUqUW|jtj(|S(sQ Build a working set from a requirement spec. Rewrites sys.path. (RtresolveRtaddRiRRR (Rtreq_specRtreqstdistsRR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs    cC@sT|jj|g|jj|x*t|tD]}|j||tq3WdS(sAdd a path item to ``.entries``, finding any distributions on it ``find_distributions(entry, True)`` is used to find distributions corresponding to the path entry, and they are added. `entry` is always appended to ``.entries``, even if it is already present. (This is because ``sys.path`` can contain the same value more than once, and the ``.entries`` of the ``sys.path`` WorkingSet should always equal ``sys.path``.) N(R t setdefaultRR6RRRR(RR R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s cC@s|jj|j|kS(s9True if `dist` is the active distribution for its project(R R=R (RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt __contains__scC@sC|jj|j}|dk r?||kr?t||n|S(sFind a distribution matching requirement `req` If there is an active distribution for the requested project, this returns it as long as it meets the version requirement specified by `req`. But, if there is an active distribution for the project and it does *not* meet the `req` requirement, ``VersionConflict`` is raised. If there is no active distribution for the requested project, ``None`` is returned. N(R R=R RaR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cc@sgx`|D]X}|j|}|dkrGx4|jD] }|Vq5Wq||kr||VqqWdS(sYield entry point objects from `group` matching `name` If `name` is None, yields all entry points in `group` from all distributions in the working set, otherwise only ones matching both `group` and `name` are yielded (in distribution order). N(RwRatvalues(RRmRRRtep((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRys    cC@sQtjdj}|d}|j||d<|j|dj||dS(s?Locate distribution for `requires` and run `script_name` scriptiRiN(RiRRR\RrRs(RtrequiresRRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRss    cc@spi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS(sYield distributions for non-duplicate projects in the working set The yield order is the order in which the items' path entries were added to the working set. iN(RR R (RtseentitemR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRBs  cC@s|r"|j|j|d|n|dkr:|j}n|jj|g}|jj|jg}| r|j|jkrdS||j|j<|j|kr|j|jn|j|kr|j|jn|j |dS(sAdd `dist` to working set, associated with `entry` If `entry` is unspecified, it defaults to the ``.location`` of `dist`. On exit from this routine, `entry` is added to the end of the working set's ``.entries`` (if it wasn't already present). `dist` is only added to the working set if it's for a project that doesn't already have a distribution in the set, unless `replace=True`. If it's added, any callbacks registered with the ``subscribe()`` method will be called. R0N( t insert_onRRatlocationR RR R R6t _added_new(RRR tinsertR0tkeystkeys2((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs   cC@s"t|ddd}i}i}g}t}tjt} x|r|jd} | |krmqFn|j| sqFn|j| j} | dkr|j j| j} | dks| | krq|rq|} |dkr| dkrt |j }qt g}t g} n|j| | |} || j<| dkrq| j| d} t| | qqn|j| n| | kr| | }t| | j|n| j| jddd}|j|x/|D]'}| |j| j| j|| Map each requirement to the extras that demanded it. c@s:fd|jddD}j p9t|S(s Evaluate markers for req against each extra that demanded it. Return False if the req has a marker and fails evaluation. Otherwise, return True. c3@s(|]}jji|d6VqdS(textraN(tmarkertevaluate(t.0RM(R(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pys s(N(N(R=RaRNtany(RRt extra_evals((RsF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR,s (RRRR,(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR(scB@seZdZd eedZdZdZd dZ dZ dZ d dZ d dZ d Zd Zd ZRS( s5Searchable snapshot of distributions on a search pathcC@s,i|_||_||_|j|dS(s!Snapshot distributions available on a search path Any distributions found on `search_path` are added to the environment. `search_path` should be a sequence of ``sys.path`` items. If not supplied, ``sys.path`` is used. `platform` is an optional string specifying the name of the platform that platform-specific distributions must be compatible with. If unspecified, it defaults to the current platform. `python` is an optional string naming the desired version of Python (e.g. ``'3.3'``); it defaults to the current version. You may explicitly set `platform` (and/or `python`) to ``None`` if you wish to map *all* distributions, not just those compatible with the running platform or Python version. N(t_distmapRjtpythontscan(Rt search_pathRjRT((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs   cC@sC|jdks0|jdks0|j|jkoBt|j|jS(sIs distribution `dist` acceptable for this environment? The distribution must match the platform and python version requirements specified when this environment was created, or False is returned. N(RTRat py_versionRRj(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytcan_addscC@s|j|jj|dS(s"Remove `dist` from the environmentN(RSR tremove(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRY(scC@sQ|dkrtj}nx2|D]*}x!t|D]}|j|q2WqWdS(sdScan `search_path` for distributions usable in this environment Any distributions found are added to the environment. `search_path` should be a sequence of ``sys.path`` items. If not supplied, ``sys.path`` is used. Only distributions conforming to the platform/python version defined at initialization are added. N(RaRiRRR(RRVR R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRU,s    cC@s|j}|jj|gS(sReturn a newest-to-oldest list of distributions for `project_name` Uses case-insensitive `project_name` comparison, assuming all the project's distributions use their project's name converted to all lowercase as their key. (R3RSR=(RR0tdistribution_key((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR!;s cC@su|j|rq|jrq|jj|jg}||krq|j||jdtjddt qqndS(sLAdd `dist` if we ``can_add()`` it and it has not already been added R thashcmptreverseN( RXt has_versionRSRR R6R<toperatort attrgetterR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRFs   cC@sW|j|}|dk r|Sx%||jD]}||kr-|Sq-W|j||S(sFind distribution best matching `req` and usable on `working_set` This calls the ``find(req)`` method of the `working_set` to see if a suitable distribution is already active. (This may raise ``VersionConflict`` if an unsuitable version of the project is already active in the specified `working_set`.) If a suitable distribution isn't active, this method returns the newest distribution in the environment that meets the ``Requirement`` in `req`. If no suitable distribution is found, and `installer` is supplied, then the result of calling the environment's ``obtain(req, installer)`` method will be returned. N(RRaR tobtain(RRRR3R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR-Os   cC@s|dk r||SdS(sObtain a distribution matching `requirement` (e.g. via download) Obtain a distro that matches requirement (e.g. via download). In the base ``Environment`` class, this routine just returns ``installer(requirement)``, unless `installer` is None, in which case None is returned instead. This method is a hook that allows subclasses to attempt other ways of obtaining a distribution before falling back to the `installer` argument.N(Ra(Rt requirementR3((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR`es cc@s0x)|jjD]}||r|VqqWdS(s=Yield the unique project names of the available distributionsN(RSR%(RR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRBqs cC@s{t|tr|j|nXt|trdxF|D](}x||D]}|j|qFWq5Wntd|f|S(s2In-place addition of a distribution or environmentsCan't add %r to environment(RRRRR(RRtprojectR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__iadd__ws cC@s@|jgdddd}x||fD]}||7}q(W|S(s4Add an environment or distribution to an environmentRjRTN(RRa(RRtnewR2((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__add__sN(RRRRaRqtPY_MAJORRRXRYRUR!RR-R`RBRcRe(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs       cB@seZdZRS(sTAn error occurred extracting a resource The following attributes are available from instances of this exception: manager The resource manager that raised this exception cache_path The base directory for resource extraction original_error The exception instance that caused extraction to fail (RRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cB@seZdZdZdZdZdZdZdZ dZ dZ dZ dd Z ed Zd Zd Zed ZRS(s'Manage resource extraction and packagescC@s i|_dS(N(t cached_files(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@st|j|S(sDoes the named resource exist?(RtR(Rtpackage_or_requirementR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR~scC@st|j|S(s,Is the named resource an existing directory?(RtR(RRhR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cC@st|j||S(s4Return a true filesystem path for specified resource(RtR(RRhR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR|s cC@st|j||S(s9Return a readable file-like object for specified resource(RtR(RRhR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR{s cC@st|j||S(s%Return specified resource as a string(RtR(RRhR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRzs cC@st|j|S(s1List the contents of the named resource directory(RtR}(RRhR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR}s cC@sttjd}|jpt}tjdj}t|jt }||_ ||_ ||_ |dS(s5Give an error message for problems extracting file(s)is Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: {old_exc} The Python egg cache directory is currently set to: {cache_path} Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. N( Ritexc_infotextraction_pathRttextwraptdedenttlstripRRRRt cache_pathtoriginal_error(Rtold_excRnttmplterr((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytextraction_errors   cC@sn|jpt}tjj||d|}yt|Wn|jnX|j|d|j|<|S(sReturn absolute location in cache for `archive_name` and `names` The parent directory of the resulting path will be created if it does not already exist. `archive_name` should be the base filename of the enclosing egg (which may not be the name of the enclosing zipfile!), including its ".egg" extension. `names`, if provided, should be a sequence of path name parts "under" the egg's extraction location. This method should only be called by resource providers that need to obtain an extraction location, and only for names they intend to extract, as it tracks the generated names for possible cleanup later. s-tmpi( RjRRRRkt_bypass_ensure_directoryRst_warn_unsafe_extraction_pathRg(Rt archive_nametnamest extract_patht target_path((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytget_cache_paths   cC@swtjdkr*|jtjd r*dStj|j}|tj@sV|tj@rsd|}tj |t ndS(sN If the default extraction path is overridden and set to an insecure location, such as /tmp, it opens up an opportunity for an attacker to replace an extracted file with an unauthorized payload. Warn the user if a known insecure location is used. See Distribute #375 for more details. tnttwindirNs%s is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).( RRR4tenvirontstattst_modetS_IWOTHtS_IWGRPR>R?t UserWarning(Rtmodetmsg((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRus &cC@s@tjdkr<tj|jdBd@}tj||ndS(s4Perform any platform-specific postprocessing of `tempname` This is where Mac header rewrites should be done; other platforms don't have anything special they should do. Resource providers should call this method ONLY after successfully extracting a compressed resource. They must NOT call it on resources that are already in the filesystem. `tempname` is the current (temporary) name of the file, and `filename` is the name it will be renamed to by the caller after this routine returns. tposiximiN(RRR~Rtchmod(RttempnametfilenameR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt postprocessscC@s%|jrtdn||_dS(sSet the base path where resources will be extracted to, if needed. If you do not call this routine before any extractions take place, the path defaults to the return value of ``get_default_cache()``. (Which is based on the ``PYTHON_EGG_CACHE`` environment variable, with various platform-specific fallbacks. See that routine's documentation for more details.) Resources are extracted to subdirectories of this path based upon information given by the ``IResourceProvider``. You may set this to a temporary directory, but then you must call ``cleanup_resources()`` to delete the extracted files when done. There is no guarantee that ``cleanup_resources()`` will be able to remove all extracted files. (Note: you may not change the extraction path for a given resource manager once resources have been extracted, unless you first call ``cleanup_resources()``.) s5Can't change extraction path, files already extractedN(RgRnRj(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR)s  cC@sdS(sB Delete all extracted resource files and directories, returning a list of the file and directory names that could not be successfully removed. This function does not have any concurrency protection, so it should generally only be called when the extraction path is a temporary directory exclusive to a single process. This method is not automatically called; you must call it explicitly or register it as an ``atexit`` function if you wish to ensure cleanup of a temporary directory used for extractions. N((Rtforce((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRCRdN((RRRRaRjRR~RR|R{RzR}RsRzt staticmethodRuRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs           cC@s"tjjdp!tjddS(s Return the ``PYTHON_EGG_CACHE`` environment variable or a platform-relevant user cache dir for an app named "Python-Eggs". tPYTHON_EGG_CACHEtappnames Python-Eggs(RR}R=R tuser_cache_dir(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRQscC@stjdd|S(sConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. s[^A-Za-z0-9.]+R%(R:tsub(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR]scC@sZyttjj|SWn9tjjk rU|jdd}tjdd|SXdS(sB Convert an arbitrary string to a standard version string RR)s[^A-Za-z0-9.]+R%N(RARREtVersionRFR0R:R(RE((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRes cC@stjdd|jS(sConvert an arbitrary string to a standard 'extra' name Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased. s[^A-Za-z0-9.-]+R(R:RR3(RM((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRqscC@s|jddS(s|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. R%R(R0(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRzscC@s;yt|Wn&tk r6}d|_d|_|SXtS(so Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise. N(Rt SyntaxErrorRaRtlinenoR(ttextte((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs  cC@sLy tjj|}|jSWn%tjjk rG}t|nXdS(s Evaluate a PEP 508 environment marker. Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. This implementation uses the 'pyparsing' module. N(RtmarkerstMarkerROt InvalidMarkerR(RRMRNR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cB@seZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZd Zd Zd Zd Zd ZdZdZdZdZdZRS(sETry to implement resources and metadata for arbitrary PEP 302 loaderscC@s:t|dd|_tjjt|dd|_dS(NRt__file__Rd(RRaRRRtdirnamet module_path(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s|j|j|S(N(t_fnR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@stj|j||S(N(tiotBytesIOR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s|j|j|j|S(N(t_getRR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s|j|j|j|S(N(t_hasRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s%|jo$|j|j|j|S(N(tegg_infoRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@sE|js dS|j|j|j|}tjrA|jdS|S(NRdsutf-8(RRRRtPY3tdecode(RRtvalue((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cC@st|j|S(N(RR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s|j|j|j|S(N(t_isdirRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s%|jo$|j|j|j|S(N(RRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@s|j|j|j|S(N(t_listdirRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR}scC@s)|jr%|j|j|j|SgS(N(RRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs c B@sd|}|j|s,ed|n|j|jdd}|jdd}|j|j|}||dsN( RRRRRRRRaRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR6s    t ZipManifestscB@s#eZdZedZeZRS(s zip manifest builder c@s?t|-fdjD}t|SWdQXdS(s Build a dictionary similar to the zipimport directory caches, except instead of tuples, store ZipInfo objects. Use a platform-specific path separator (os.sep) for the path keys for compatibility with pypy on Windows. c3@s3|])}|jdtjj|fVqdS(RN(R0Rtseptgetinfo(RPR(tzfile(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pys UsN(tContextualZipFiletnamelistRL(RRRR((RsF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytbuildJs  (RRRRLRtload(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyREstMemoizedZipManifestscB@s)eZdZejddZdZRS(s% Memoized zipfile manifests. t manifest_modsmanifest mtimecC@svtjj|}tj|j}||ksC||j|krk|j|}|j||||"os.rename" and "os.unlink" are not supported on this platforms .$extracttdirR{(t_indexRRRRkRRRt WRITE_SUPPORTtIOErrorRzRRt _is_currentt_mkstemptwriteRRRRRRterrortisfileRR Rs( RRRRtlastRRt real_pathtoutfttmpnam((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs@$    c C@s|j|j|\}}tjj|s2tStj|}|j|ks_|j|krctS|j j |}t |d}|j }WdQX||kS(sK Return True if the file_path is current for this zip_path RN( RRRRRRR~tst_sizeRRRR R( Rt file_pathRRRR~t zip_contentstft file_contents((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscC@sa|jdkrZg}x6dD].}|j|r|j|j|qqW||_n|jS(Nsnative_libs.txtseager_resources.txt(snative_libs.txtseager_resources.txt(RRaRR/R(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs  cC@sy |jSWntk ri}x~|jD]s}|jtj}xX|rtjj|d }||kr||j|dPqF|jg||R?(RR treplacement_charRqR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRLs  cC@st|j|S(N(RR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRTs(RRRRRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR1s     cB@seZdZdZRS(ssMetadata provider for egg directories Usage:: # Development eggs: egg_info = "/path/to/PackageName.egg-info" base_dir = os.path.dirname(egg_info) metadata = PathMetadata(base_dir, egg_info) dist_name = os.path.splitext(os.path.basename(egg_info))[0] dist = Distribution(basedir, project_name=dist_name, metadata=metadata) # Unpacked egg directories: egg_path = "/path/to/PackageName-ver-pyver-etc.egg" metadata = PathMetadata(egg_path, os.path.join(egg_path,'EGG-INFO')) dist = Distribution.from_filename(egg_path, metadata=metadata) cC@s||_||_dS(N(RR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRls (RRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRXscB@seZdZdZRS(s Metadata provider for .egg filescC@s`|jtj|_||_|jrFtjj|j|j|_n |j|_|j dS(s-Create a metadata provider from a zipimporterN( RRRRRtprefixRRkRR(Rtimporter((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRts   ! (RRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRqsRLt_distribution_finderscC@s|t|>> names = 'bar', 'foo', 'Python-2.7.10.egg', 'Python-2.7.2.egg' >>> _by_version_descending(names) ['Python-2.7.10.egg', 'Python-2.7.2.egg', 'foo', 'bar'] >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.egg' >>> _by_version_descending(names) ['Setuptools-1.2.3.egg', 'Setuptools-1.2.3b1.egg'] >>> names = 'Setuptools-1.2.3b1.egg', 'Setuptools-1.2.3.post1.egg' >>> _by_version_descending(names) ['Setuptools-1.2.3.post1.egg', 'Setuptools-1.2.3b1.egg'] cS@sYtjj|\}}tj|jd|g}g|D]}tjj|^q=S(s6 Parse each component of the filename R%( RRtsplitextt itertoolstchainR RRER(RtextR7R.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt _by_versionsR R\(tsortedR(RwR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_by_version_descendings cc@s9t|}tjj|r5tj|tjr5t|rntj|dt |tjj |dVq5t tj |}x|D]}|j }|jds|jdr=tjj ||}tjj|rttj |dkrqnt ||}n t|}tj|||dtVq| rt|rttjj ||}x|D] } | VqrWq| r|jdrttjj ||} | j} WdQXxa| D]V} | jsqntjj || j} t| }x|D] }|VqWPqWqqWndS( s6Yield distributions accessible on a sys.path directoryR sEGG-INFOs .egg-infos .dist-infoit precedences .egg-linkN(t_normalize_cachedRRR taccesstR_OKRRRRRkR!RR3RRRt from_locationRRR t readlineststriptrstrip(R RRtpath_item_entriesR R3tfullpathR RRt entry_filet entry_linestlineRR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt find_on_pathsB '             t FileFindert_namespace_handlerst_namespace_packagescC@s|t|[^-]+) ( -(?P[^-]+) ( -py(?P[^-]+) ( -(?P.+) )? )? )? cB@seZdZd d ddZdZdZedZdZ dddZ e j dZ eddZed Zedd Zedd ZRS(s3Object representing an advertised importable objectcC@snt|std|n||_||_t||_tjddj|j |_ ||_ dS(NsInvalid module namesx[%s]t,( tMODULERnRt module_nameRtattrsRRRkR.R(RRR[R\R.R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs   "cC@sfd|j|jf}|jr<|ddj|j7}n|jrb|ddj|j7}n|S(Ns%s = %st:R)s [%s]RY(RR[R\RkR.(RR-((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs   cC@sdt|S(NsEntryPoint.parse(%r)(RA(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRscO@sO| s|s|r,tjdtddn|rE|j||n|jS(sH Require packages for this EntryPoint, then resolve it. sJParameters to load are deprecated. Call .resolve and .require separately.R9i(R>R?tDeprecationWarningRrR(RRrRbR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cC@sdt|jddgdd}ytjt|j|SWn%tk r_}tt|nXdS(sD Resolve the entry point from its module and attrs. tfromlistRtleveliN( RR[t functoolstreduceRR\RRRA(RRtexc((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs cC@si|jr%|j r%td|n|jj|j}tj|||}tttj|dS(Ns&Can't require() without a distribution( R.RRRRRR'RR(RR2R3RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRr s s]\s*(?P.+?)\s*=\s*(?P[\w.]+)\s*(:\s*(?P[\w.]+))?\s*(?P\[.*\])?\s*$cC@s|jj|}|s0d}t||n|j}|j|d}|drl|djdnd}||d|d|||S(sParse a single entry point from string `src` Entry point syntax follows the form:: name = some.module:some.attr [extra1, extra2] The entry name and module name are required, but the ``:attrs`` and ``[extras]`` parts are optional s9EntryPoint must be in 'name=module:attrs [extras]' formatR.tattrR)RR((tpatternRhRnt groupdictt _parse_extrasR (RtsrcRRpRtresR.R\((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s  #cC@s9|s dStjd|}|jr2tn|jS(Ntx((RRtspecsRnR.(Rt extras_specR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRg$ s   cC@st|std|ni}xZt|D]L}|j||}|j|krptd||jn|||j '{project_name} ({version})' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommended to migrate to PEP 440 compatible versions. s R(RREt LegacyVersionRRRkRlR(R0R>R?RtvarsR(RtLVt is_legacyRq((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_warn_legacy_version s  cC@sgy |jSWnUtk rbt|j|j}|dkr^d}t||j|n|SXdS(Ns(Missing 'Version:' header and/or %s file(R~RR|t _get_metadatatPKG_INFORaRn(RRERq((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRE s   cC@sy |jSWntk rigd6}|_xdD]}xt|j|D]\}}|rd|kr|jdd\}}t|rg}qt|sg}qnt|pd}n|j |gj t |qRWq6W|SXdS(Ns requires.txts depends.txtR]i(s requires.txts depends.txt( t_Distribution__dep_mapRRaRRR RRRRR/R(RtdmRRMRRN((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_dep_map s    "     'cC@s|j}g}|j|jddxS|D]K}y|j|t|Wq/tk rytd||fq/Xq/W|S(s@List of Requirements needed for this distro if `extras` are useds%s has no such extra feature %rN((RR/R=RaRRR(RR.RtdepsR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s   cc@s5|j|r1x|j|D] }|VqWndS(N(RR(RRR.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR scC@s|dkrtj}n|j|d||tjkrt|jx6|jdD]"}|tjkrWt|qWqWWndS(s>Ensure distribution is importable on `path` (default=sys.path)R0snamespace_packages.txtN( RaRiRR!RR"RRR(RRR0tpkg((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytactivate s   cC@sOdt|jt|j|jp'tf}|jrK|d|j7}n|S(s@Return what this distribution's standard .egg filename should bes %s-%s-py%sR%(RR0RERWRfRj(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s  cC@s(|jrd||jfSt|SdS(Ns%s (%s)(R"RA(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s cC@sMyt|dd}Wntk r/d}nX|p9d}d|j|fS(NREs[unknown version]s%s %s(RRaRnR0(RRE((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR% s    cC@s.|jdrt|nt|j|S(sADelegate all unrecognized public attributes to .metadata providerR(R4RRR(RRd((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt __getattr__- scK@s(|jt|tjj|||S(N(R&R#RRR(RRR RO((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR3 scC@sTt|jtjjr1d|j|jf}nd|j|jf}tj|S(s?Return a ``Requirement`` that matches this distribution exactlys%s==%ss%s===%s(RRRRERR0RR(Rtspec((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR=: scC@sD|j||}|dkr:td||ffn|jS(s=Return the `name` entry point of `group` or raise ImportErrorsEntry point %r not foundN(RxRaRR(RRmRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRvC s cC@scy |j}Wn3tk rBtj|jd|}|_nX|dk r_|j|iS|S(s=Return the entry point map for `group`, or the full entry mapsentry_points.txtN(t_ep_mapRRRrRRaR=(RRmtep_map((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRwJ s    cC@s|j|j|S(s<Return the EntryPoint object for `group`+`name`, or ``None``(RwR=(RRmR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRxV sc C@s|p |j}|sdSt|}tjj|}g|D]}|rVt|pY|^q>}xt|D]\}}||kr|rPqdSqo||kro|jtkro| r|||krdS|tjkr|j n|j |||j ||PqoqoW|tjkr.|j n|rG|j d|n |j |dSxMt ry|j ||d} Wntk rPq[X|| =|| =| }q[WdS(sEnsure self.location is on path If replace=False (default): - If location is already in path anywhere, do nothing. - Else: - If it's an egg and its parent directory is on path, insert just ahead of the parent. - Else: add to the end of path. If replace=True: - If location is already on path anywhere (not eggs) or higher priority than its parent (eggs) do nothing. - Else: - If it's an egg and its parent directory is on path, insert just ahead of the parent, removing any lower-priority entries. - Else: add it to the front of path. Nii(R"R#RRRt enumerateR"RRitcheck_version_conflictR$R6RR?Rn( RRtlocR0tnloctbdirRItnpathR tnp((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR!Z sB +       cC@s|jdkrdStj|jd}t|j}x|jdD]}|tjksJ||ksJ|tkr}qJn|dkrqJnt tj|dd}|rt|j |sJ|j |jrqJnt d|||jfqJWdS( Nt setuptoolssnamespace_packages.txts top_level.txtt pkg_resourcestsiteRsIModule %s was already imported from %s, but %s is being added to sys.path(RRR( R RLRMRRR"RiRR2RRaR4t issue_warning(RtnspRtmodnametfn((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s"  cC@s8y |jWn&tk r3tdt|tSXtS(NsUnbuilt egg for (RERnRRRR(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR] s   cK@sYd}x0|jD]"}|j|t||dqW|jd|j|j|S(s@Copy this distribution, substituting in any changed keyword argss<project_name version py_version platform location precedenceR N(R RRRaRR(RRORwRd((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytclone s  cC@s g|jD]}|r |^q S(N(R(Rtdep((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR. sN((+RRRRRaRfRRRLR&RRR[RRRRRRRR RRRERRRRRRRRRRR=RvRwRxR!RR]RR.(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRc sN                    C   tEggInfoDistributioncB@seZdZRS(cC@s.t|j|j}|r*||_n|S(s Packages installed by distutils (e.g. numpy or scipy), which uses an old safe_version, and so their version numbers can get mangled when converted to filenames (e.g., 1.11.0.dev0+2329eae to 1.11.0.dev0_2329eae). These distributions will not be parsed properly downstream by Distribution and safe_version, so take an extra step and try to get the version number from the metadata file itself instead of the filename. (R|RRR~(Rt md_version((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s  (RRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR stDistInfoDistributioncB@sJeZdZdZejdZedZedZ dZ RS(sGWrap an actual or potential sys.path entry w/metadata, .dist-info styletMETADATAs([\(,])\s*(\d.*?)\s*([,\)])cC@sTy |jSWnBtk rO|j|j}tjjj||_|jSXdS(sParse and cache metadataN(t _pkg_infoRRRtemailtparsertParsertparsestr(RR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_parsed_pkg_info s   cC@s6y |jSWn$tk r1|j|_|jSXdS(N(t_DistInfoDistribution__dep_mapRt_compute_dependencies(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s   c@sigd6}|_gx3|jjdp2gD]}jt|q3Wfd}t|d}|dj|xR|jjdpgD]8}t|j}t t|||||R?(RbROR`RT((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s  tRequirementParseErrorcB@seZdZRS(cC@sdj|jS(NR(RkRb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s(RRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR scc@stt|}xm|D]e}d|krA||jd }n|jdrs|d j}|t|7}nt|VqWdS(sYield ``Requirement`` objects for each specification in `strs` `strs` must be a string, or a (possibly-nested) iterable thereof. s #s\iN(RxRRRR(RwR(RWRmR.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR# s  cB@sMeZdZdZdZdZdZdZedZ RS(cC@sytt|j|Wn+tjjk rG}tt|nX|j|_ t |j}||j |_ |_ g|jD]}|j|jf^q|_ttt|j|_|j |jt|j|jrt|jndf|_t|j|_dS(s>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!N(RRRRR1tInvalidRequirementRRARt unsafe_nameRR3R0R t specifierR^RERkRRRR.RRNRathashCmpRt_Requirement__hash(Rtrequirement_stringRR0R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR7 s + $cC@st|to|j|jkS(N(RRR(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRK scC@s ||k S(N((RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRQ scC@sGt|tr1|j|jkr%tS|j}n|jj|dtS(Nt prereleases(RRR RRERtcontainsR(RR ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRT s  cC@s|jS(N(R(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR` scC@sdt|S(NsRequirement.parse(%r)(RA(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRc RdcC@st|\}|S(N(R(R-R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRe s( RRRRRRRRRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR6 s     cC@s:t|ts3d|tfdY}|jdS|jS(s&Get an mro for a type or classic classRcB@seZRS((RR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRo si(RRtobjectt__mro__(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_get_mrok s cC@sAx:tt|dt|D]}||kr||SqWdS(s2Return an adapter factory for `ob` from `registry`RN(RRR(tregistryR]tt((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRv s% cC@s8tjj|}tjj|s4tj|ndS(s1Ensure that the parent directory of `path` existsN(RRRR tmakedirs(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR} scC@s^tstdnt|\}}|rZ|rZt| rZt|t|dndS(s/Sandbox-bypassing version of ensure_directory()s*"os.mkdir" not supported on this platform.iN(RRR R RtR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRt s  cc@sd}g}xt|D]y}|jdr|jdrs|sI|rW||fVn|dd!j}g}qtd|q|j|qW||fVdS(ssSplit a string or iterable thereof into (section, content) pairs Each ``section`` is a stripped version of the section header ("[section]") and each ``content`` is a list of stripped lines excluding blank lines and comment-only lines. If there are any such lines before the first section header, they're returned in a first ``section`` of ``None``. t[t]iisInvalid section headingN(RaRR4RR(RnR6(R-tsectiontcontentR.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s  cO@s7tj}ztt_tj||SWd|t_XdS(N(RR tos_openttempfiletmkstemp(RbROtold_open((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR s   tignoretcategoryR6cO@s||||S(N((RRbR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt _call_aside s cC@sSt}||dR~RatpkgutilR^RjR)Rt email.parserRRRkRRRJRtimpt pip._vendorRtpip._vendor.six.movesRRRRRRR RRRR Rtos.pathR R timportlib.machineryt machineryRRRaR RRt version_infoRR?RrRR@RRRRERRCRRDRHRKRPRVRXR[R^R_R`t _sget_nonet _sset_noneRqt__all__t ExceptionRRRRRRRfRRRRRRRtRlRRfR;RgRRRRsRRuRvRwRxRRRRLR(RRt RuntimeErrorRRRRRRRRRRRRRRRRRRRRRRRRRRRRR!R/t ImpImporterRR0RR=R:RRRORPRR#RR8RRhRZR<t IGNORECASERRRvR|RRRRRRnRRR1RRRRRtRRtfilterwarningsRRIRR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyts                               +b                                  .    z    a   '      .    !        ~ f/   5