� ��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 r�e(Z'nXdd lm)Z*dd l+m,Z,m-Z-yddl.j/Z0e0j1Wnek re2Z0nXdd lm3Z3dd lm4Z4e5d �e5d�e5d�e5d�ddfej6ko�ddfknr�dZ7e j8e7�ne2Z9e2Z:de;fd��YZ<de=fd��YZ>de>e4j?j@fd��YZAde>e4j?jBfd��YZCd�ZDiZEd�ZFd�ZGd�ZHd�ZId �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@eQfdj��YZRdAeRfdk��YZSdleSfdm��YZTdBeRfdn��YZUdCeRfdo��YZViZWej?d ZXdZYdpZZdqZ[dZ\drZ]ds�Z^dt�Z_gdu�Z`dv�Zadw�Zbejcdx�Zdejcdy�ZeebZfdz�Zgd{�ZhehZid|�Zjd}�Zke2d~�Zld�ZmdXfd���YZndYenfd���YZod;e=fd���YZpd�eqfd���YZrd:e=fd���YZsesZtdDeufd���YZvd<fd���YZwd��Zxd��Zyd��Zzd��Z{d��Z|d��Z}e2d��Z~d_fd���YZe^e=e�d`efd���YZ�dae�fd���YZ�e�j��d]efd���YZ�e��Z�d�eqfd���YZ�d�e�fd���YZ�d�e j�fd���YZ�dbe�fd���YZ�e^e j�e��dZe�fd���YZ�d[e�fd���YZ�d\e�fd���YZ�eFd�d�i�d��Z�e(d��Z�e(d��Z�e�e j�e��e(d��Z�e�e=e��d��Z�e(d��Z�e�ej�e��e�e0d��r(e�e0j�e��neFd�d�i�eFd�d�i�d��Z�d��Z�d��Z�d��Z�e2d��Z�d��Z�e�ej�e��e�e j�e��e�e0d��r�e�e0j�e��nd��Z�e�e=e��d��Z�id��Z�d��Z�d��Z�d��Z�ejcd��j�Z�ejcd�ej�ej�B�j�Z�d?e=fd���YZ�d��Z�d��Z�d=e=fd���YZ�d�e�fd���YZ�d�e�fd���YZ�ie�d�6e�d�6e�d�6Z�d��Z�d�e�fd���YZ�d��Z�d>e4j�j�fd���YZ�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�e j�d�d�e<d�e&�d��Z�e�e��d���Z�e�d���Z�dS(�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@sYeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z RS( cC@stt|�j�S(N(tsuperRt__hash__(tself((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRcscC@s9t|t�rt|�|kStt|�j|�SdS(N(t isinstancettupleRRt__lt__(Rtother((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRfscC@s9t|t�rt|�|kStt|�j|�SdS(N(RRRRt__le__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRlscC@s9t|t�rt|�|kStt|�j|�SdS(N(RRRRt__eq__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRrscC@s9t|t�rt|�|kStt|�j|�SdS(N(RRRRt__ge__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRxscC@s9t|t�rt|�|kStt|�j|�SdS(N(RRRRt__gt__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR~scC@s9t|t�rt|�|kStt|�j|�SdS(N(RRRRt__ne__(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@st|�|S(N(R(Rtkey((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt __getitem__�sc#@s�tjdtj��idd6dd6dd6dd6dd 6j���fd ���fd �}tjd td d�x|t|��D] }|Vq�WdS(Ns(\d+ | [a-z]+ | \.| -)tctpretpreviewsfinal-t-trct@tdevc3@suxi�j|�D]X}�||�}| s|dkr>qn|d dkr_|jd�Vqd|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_parts�s c@s�g}x��|j��D]�}|jd�r�|dkrdx'|r`|ddkr`|j�q=Wnx'|r�|ddkr�|j�qgWn|j|�qWt|�S(NR+s*finali����s*final-t00000000(tlowert startswithtpoptappendR(R-tpartsR.(R1(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytold_parse_version�s s�You 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__.pyRC�stSetuptoolsLegacyVersioncB@seZRS((RR(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRD�scC@s3yt|�SWntjjk r.t|�SXdS(N(RCRtversiontInvalidVersionRD(tv((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt parse_version�scK@s-t�j|�tjtj||��dS(N(tglobalstupdatet _state_varstdicttfromkeys(tvartypetkw((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_declare_state�scC@sLi}t�}x6tj�D](\}}|d|||�||�tcC@s{t�}tj|�}|dk rwtjdkrwy-ddjt�d �|jd�f}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_platform�s - 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@seZdZd�ZRS(s.Abstract base for dependency resolution errorscC@s|jjt|j�S(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__.pyR�FscB@sDeZdZdZed��Zed��Zd�Zd�ZRS(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|jjt��S(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( RRRR�tpropertyR�R�R�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�Ms  R�cB@s*eZdZejdZed��ZRS(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__.pyR�us(RRRR�R�R�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�ms cB@sSeZdZdZed��Zed��Zed��Zd�Zd�Z 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__.pyR��scC@s |jdS(Ni(Rb(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt requirers�scC@s|js dSdj|j�S(Nsthe applications, (R�Rk(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt requirers_str�s cC@s|jjt��S(N(R�R�R�(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scC@s |j�S(N(R�(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt__str__�s( RRRR�R�R�R�R�R�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�zs 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__.pyR��siii����cC@s|t|scB@s>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(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(s�Yield 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((R�t namespace((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRsVRd(RRR�R�R�R�RRs(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�Cs      cB@sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(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__.pyR�Zs     cB@s�eZdZdd�Zed��Zed��Zd�Zd�Z d�Z dd�Z d�Z d �Z deed �Zdded �Zdded �Zd �Zed�Zd�Zd�Zd�ZRS(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 callbacksRaRiR�t 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__RR�RrR�t_build_from_requirements(tclstwsR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt _build_master�s   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. (R�tresolveR�taddRiR�RR (Rtreq_specRtreqstdistsR�R ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s    cC@sT|jj|g�|jj|�x*t|t�D]}|j||t�q3WdS(s�Add 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 setdefaultRR6R�R�RR�(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(s�Find 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�(RR�R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s cc@sgx`|D]X}|j|�}|dkrGx4|j�D] }|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(RRmR�R�Rtep((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRy�s    cC@sQtjd�j}|d}|j�||d<|j|�dj||�dS(s?Locate distribution for `requires` and run `script_name` scriptiRiN(RiR�R�R\RrRs(RtrequiresR�R�R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRs�s    cc@spi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS(s�Yield 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__.pyRB�s  cC@s�|r"|j|j|d|�n|dkr:|j}n|jj|g�}|jj|jg�}| r�|j|jkr�dS||j|j<|j|kr�|j|j�n|j|kr�|j|j�n|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(RR�R tinsertR0tkeystkeys2((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s   cC@s"t|�ddd�}i}i}g}t�}tjt�} x�|r|jd�} | |krmqFn|j| �s�qFn|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| j�ddd�}|j|�x/|D]'}| |j| j�| j|| Map each requirement to the extras that demanded it. c@s:�fd�|j�d�dD�}�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|d6�VqdS(textraN(tmarkertevaluate(t.0RM(R�(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pys �s(N(N(R=RaRNtany(RR�t extra_evals((R�sF/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@s�eZdZd e�ed�Zd�Zd�Zd d�Z d�Z d�Z d d�Z d d�Z 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|j�S(s�Is 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_versionR�Rj(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(RaRiR�R�R(RRVR R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRU,s    cC@s|j�}|jj|g�S(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|j�rq|jj|jg�}||krq|j|�|jdtjd�dt �qqndS(sLAdd `dist` if we ``can_add()`` it and it has not already been added R thashcmptreverseN( RXt has_versionRSRR R6R<toperatort attrgetterR�(RR�R((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(s�Find 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(R�RaR tobtain(RR�R�R3R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR-Os   cC@s|dk r||�SdS(s�Obtain 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)|jj�D]}||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|t�r|j|�nXt|t�rdxF|D](}x||D]}|j|�qFWq5Wntd|f��|S(s2In-place addition of a distribution or environmentsCan't add %r to environment(RR�RR�R�(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(R�Ra(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__.pyR�s       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__.pyR��s cB@s�eZdZdZd�Zd�Zd�Zd�Zd�Z d�Z d�Z d�Z 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__.pyR�scC@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__.pyR�s 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__.pyRz�s 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@sttj�d}|jpt�}tjd�j�}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_pathR�ttextwraptdedenttlstripR�R�R�Rt cache_pathtoriginal_error(Rtold_excRnttmplterr((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytextraction_error�s   cC@sn|jpt�}tjj||d|�}yt|�Wn|j�nX|j|�d|j|<|S(s�Return 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( RjR�R�R�Rkt_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_path�s   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).( R�R�R4tenvirontstattst_modetS_IWOTHtS_IWGRPR>R?t UserWarning(R�tmodetmsg((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRu�s &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. tposiximi�N(R�R�R~Rtchmod(RttempnametfilenameR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt postprocessscC@s%|jrtd��n||_dS(s�Set 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__.pyR�CRdN((RRRRaRjRR~RR|R{RzR}RsRzt staticmethodRuR�R�R�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s           cC@s"tjjd�p!tjdd�S(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(R�R}R=R tuser_cache_dir(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�QscC@stjdd|�S(s�Convert 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 R�R)s[^A-Za-z0-9.]+R%N(RARREtVersionRFR0R:R�(RE((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�es cC@stjdd|�j�S(s�Convert 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:R�R3(RM((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�qscC@s|jdd�S(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__.pyR�zscC@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(R�t SyntaxErrorRaR�tlinenoR�(ttextte((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s  cC@sLy tjj|�}|j�SWn%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�(R�RMRNR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s cB@s�eZdZdZdZdZd�Zd�Zd�Z d�Z d�Z d�Z d�Z d�Zd �Zd �Zd �Zd �Zd �Zd�Zd�Zd�Zd�Zd�ZRS(sETry to implement resources and metadata for arbitrary PEP 302 loaderscC@s:t|dd�|_tjjt|dd��|_dS(NR�t__file__Rd(R�RaR�R�R�tdirnamet module_path(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@s|j|j|�S(N(t_fnR�(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@stj|j||��S(N(tiotBytesIOR(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@s|j|j|j|��S(N(t_getR�R�(RRR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@s|j|j|j|��S(N(t_hasR�R�(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@s%|jo$|j|j|j|��S(N(tegg_infoR�R�(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scC@sE|js dS|j|j|j|��}tjrA|jd�S|S(NRdsutf-8(R�R�R�RtPY3tdecode(RR�tvalue((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s cC@st|j|��S(N(R�R�(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scC@s|j|j|j|��S(N(t_isdirR�R�(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�scC@s%|jo$|j|j|j|��S(N(R�R�R�(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scC@s|j|j|j|��S(N(t_listdirR�R�(RR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR}�scC@s)|jr%|j|j|j|��SgS(N(R�R�R�(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s c B@sd|}|j|�s,ed|��n|j|�jdd�}|jdd�}|j|j|�}||dsN( RRRR�R�R�R�RaR�R(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�6s    t ZipManifestscB@s#eZdZed��ZeZRS(s zip manifest builder c@s?t|��-��fd��j�D�}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|])}|jdtj��j|�fVqdS(R�N(R0R�tseptgetinfo(RPR�(tzfile(sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pys UsN(tContextualZipFiletnamelistRL(RR�RR((R�sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytbuildJs  (RRRRLR�tload(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�EstMemoizedZipManifestscB@s)eZdZejdd�Zd�ZRS(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_indexR�R�R�RkR�R�R�t WRITE_SUPPORTtIOErrorRzR�R�t _is_currentt_mkstemptwriteR�R�R�RR�RterrortisfileR�R Rs( RRR�R�tlastR�R�t real_pathtoutfttmpnam((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s@$    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 R�N( R�R�R�R�R�R�R~tst_sizeR�R�R�R R�( Rt file_pathR�R�R�R~t zip_contentstft file_contents((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scC@sa|jdkrZg}x6dD].}|j|�r|j|j|��qqW||_n|jS(Nsnative_libs.txtseager_resources.txt(snative_libs.txtseager_resources.txt(R�RaR�R/R�(RR�R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s  cC@s�y |jSWn�tk r�i}x~|jD]s}|jtj�}xX|r�tjj|d �}||kr�||j|d�PqF|j�g||R?(RR treplacement_charRqR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRLs  cC@st|j|��S(N(R�R�(RR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�Ts(RRRRR�R�RR�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�1s     cB@seZdZd�ZRS(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(R�R�(RR�R�((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__.pyR�XscB@seZdZd�ZRS(s Metadata provider for .egg filescC@s`|jtj|_||_|jrFtjj|j|j�|_n |j|_|j �dS(s-Create a metadata provider from a zipimporterN( R�R�R�R�R�tprefixR�RkR�R�(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__.pyR�qsRLt_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%( R�R�tsplitextt itertoolstchainR RRER�(R�textR7R.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt _by_version�sR R\(tsortedR�(RwR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_by_version_descending�s cc@s9t|�}tjj|�r5tj|tj�r5t|�rntj|dt |tjj |d���Vq5t tj |��}x�|D]�}|j �}|jd�s�|jd�r=tjj ||�}tjj|�rttj |��dkrq�nt ||�}n t|�}tj|||dt�Vq�| r�t|�r�ttjj ||��}x�|D] } | VqrWq�| r�|jd�r�ttjj ||���} | j�} WdQXxa| D]V} | j�s�q�ntjj || j��} t| �}x|D] }|VqWPq�Wq�q�WndS( s6Yield distributions accessible on a sys.path directoryR sEGG-INFOs .egg-infos .dist-infoit precedences .egg-linkN(t_normalize_cachedR�R�R taccesstR_OKR�R�RR�RkR!R�R3RR�R�t from_locationR�R�R t readlineststriptrstrip(R RRtpath_item_entriesR R3tfullpathR RR�t entry_filet entry_linestlineR�R ((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt find_on_path�sB '             t FileFindert_namespace_handlerst_namespace_packagescC@s|t|[^-]+) ( -(?P[^-]+) ( -py(?P[^-]+) ( -(?P.+) )? )? )? cB@s�eZdZd d dd�Zd�Zd�Zed�Zd�Z ddd�Z e j d�Z edd��Zed ��Zedd ��Zedd ��ZRS(s3Object representing an advertised importable objectcC@snt|�std|��n||_||_t|�|_tjddj|��j |_ ||_ dS(NsInvalid module namesx[%s]t,( tMODULERnR�t module_nameRtattrsR�R�RkR.R�(RR�R[R\R.R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s   "cC@sfd|j|jf}|jr<|ddj|j�7}n|jrb|ddj|j�7}n|S(Ns%s = %st:R)s [%s]RY(R�R[R\RkR.(RR-((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��s   cC@sdt|�S(NsEntryPoint.parse(%r)(RA(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR��scO@sO| s|s|r,tjdtdd�n|rE|j||�n|j�S(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__.pyR��s cC@sdt|jddgdd�}ytjt|j|�SWn%tk r_}tt|���nXdS(sD Resolve the entry point from its module and attrs. tfromlistRtleveliN( R�R[t functoolstreduceR�R\RR�RA(RR�texc((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�s cC@si|jr%|j r%td|��n|jj|j�}tj|||�}tttj|��dS(Ns&Can't require() without a distribution( R.R�R�RR�RR'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|djd�nd}||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)R�R�((tpatternRhRnt groupdictt _parse_extrasR (RtsrcR�RpR�tresR.R\((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR� s  #cC@s9|s dStjd|�}|jr2t��n|jS(Ntx((R�R�tspecsRnR.(Rt extras_specR�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRg$ s   cC@s�t|�std|��ni}xZt|�D]L}|j||�}|j|krptd||j��n|||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 LegacyVersionRR�RkRlR(R0R>R?R�tvarsR(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@s�y |jSWn�tk r�igd6}|_x�dD]�}x�t|j|��D]�\}}|r�d|kr�|jdd�\}}t|�r�g}q�t|�s�g}q�nt|�p�d}n|j |g�j t |��qRWq6W|SXdS(Ns requires.txts depends.txtR]i(s requires.txts depends.txt( t_Distribution__dep_mapRRaR�R�R R�R�R�RR/R�(RtdmR�RMRRN((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt_dep_map� s    "     'cC@s�|j}g}|j|jdd��xS|D]K}y|j|t|��Wq/tk rytd||f��q/Xq/W|S(s@List of Requirements needed for this distro if `extras` are useds%s has no such extra feature %rN((R�R/R=RaR�R�R�(RR.R�tdepsR((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR� s   cc@s5|j|�r1x|j|�D] }|VqWndS(N(R�R�(RR�R.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR� scC@s�|dkrtj}n|j|d|�|tjkr�t|j�x6|jd�D]"}|tjkrWt|�qWqWWndS(s>Ensure distribution is importable on `path` (default=sys.path)R0snamespace_packages.txtN( RaRiR�R!R�R"R�R�R�(RR�R0tpkg((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pytactivate s   cC@sOdt|j�t|j�|jp'tf}|jrK|d|j7}n|S(s@Return what this distribution's standard .egg filename should bes %s-%s-py%sR%(R�R0RERWRfRj(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(R�RaRnR0(RRE((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�% s    cC@s.|jd�rt|��nt|j|�S(sADelegate all unrecognized public attributes to .metadata providerR�(R4RR�R(RRd((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyt __getattr__- scK@s(|jt|�tjj|�||�S(N(R&R#R�R�R�(RR�R RO((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR3 scC@sTt|jtjj�r1d|j|jf}nd|j|jf}tj|�S(s?Return a ``Requirement`` that matches this distribution exactlys%s==%ss%s===%s(RR�RRER�R0R�R�(Rtspec((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR=: scC@sD|j||�}|dkr:td||ff��n|j�S(s=Return the `name` entry point of `group` or raise ImportErrorsEntry point %r not foundN(RxRaR�R�(RRmR�R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRvC s cC@scy |j}Wn3tk rBtj|jd�|�}|_nX|dk r_|j|i�S|S(s=Return the entry point map for `group`, or the full entry mapsentry_points.txtN(t_ep_mapRR�RrR�RaR=(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>}x�t|�D]�\}}||kr�|r�PqdSqo||kro|jtkro| r�|||kr�dS|tjkr�|j �n|j ||�|j ||�PqoqoW|tjkr.|j �n|rG|j d|�n |j |�dSxMt r�y|j ||d�} Wntk r�Pq[X|| =|| =| }q[WdS(s�Ensure 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#R�R�R�t enumerateR"R�Ritcheck_version_conflictR$R6R�R?Rn( RR�tlocR0tnloctbdirRItnpathR tnp((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR!Z sB +       cC@s�|jdkrdStj|jd��}t|j�}x�|jd�D]�}|tjksJ||ksJ|tkr}qJn|dkr�qJnt tj|dd�}|r�t|�j |�sJ|j |j�r�qJnt d|||jf�qJWdS( Nt setuptoolssnamespace_packages.txts top_level.txtt pkg_resourcestsiteR�sIModule %s was already imported from %s, but %s is being added to sys.path(R�R�R�( R RLRMR�R�R"RiR�R2R�RaR4t issue_warning(RtnspR�tmodnametfn((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�� s"  cC@s8y |jWn&tk r3tdt|��tSXtS(NsUnbuilt egg for (RERnR�R�R�R�(R((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR]� s   cK@sYd}x0|j�D]"}|j|t||d��qW|jd|j�|j|�S(s@Copy this distribution, substituting in any changed keyword argss<project_name version py_version platform location precedenceR N(R RR�RaRR�(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((+RRRR�RaRfR�RRLR&R�R�R[RRRRRRRR R�R�RER�RR�R�R�R�R�R�R�RR=RvRwRxR!R�R]R�R.(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�c sN                    C   tEggInfoDistributioncB@seZd�ZRS(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|R�R�R~(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@sJeZdZdZejd�Zed��Zed��Z d�Z RS(sGWrap an actual or potential sys.path entry w/metadata, .dist-info styletMETADATAs([\(,])\s*(\d.*?)\s*([,\)])cC@sTy |jSWnBtk rO|j|j�}tjj�j|�|_|jSXdS(sParse and cache metadataN(t _pkg_infoRR�R�temailtparsertParsertparsestr(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@s�igd6}|_g�x3|jjd�p2gD]}�jt|��q3W�fd�}t|d��}|dj|�xR|jjd�p�gD]8}t|j��}t t||��|�||R?(RbROR`RT((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR� s  tRequirementParseErrorcB@seZd�ZRS(cC@sdj|j�S(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@s�tt|��}xm|D]e}d|krA||jd� }n|jd�rs|d j�}|t|�7}nt|�VqWdS(s�Yield ``Requirement`` objects for each specification in `strs` `strs` must be a string, or a (possibly-nested) iterable thereof. s #s\i����N(RxR�R�RR(RwR�(RWRmR.((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�# s  cB@sMeZd�Zd�Zd�Zd�Zd�Zd�Zed��Z RS(cC@sytt|�j|�Wn+tjjk rG}tt|���nX|j|_ t |j�}||j �|_ |_ g|jD]}|j|jf^q�|_ttt|j��|_|j |jt|j�|jr�t|j�ndf|_t|j�|_dS(s>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!N(RR�RRR1tInvalidRequirementR�RAR�t unsafe_nameR�R3R0R t specifierR^RERkRRR�R.R�RNRathashCmpR�t_Requirement__hash(Rtrequirement_stringR�R0R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR7 s + $cC@st|t�o|j|jkS(N(RR�R�(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|t�r1|j|jkr%tS|j}n|jj|dt�S(Nt prereleases(RR�R R�RER�tcontainsR�(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__.pyR�c RdcC@st|�\}|S(N(R�(R-R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�e s( RRRRRRRR�R�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�6 s     cC@s:t|t�s3d|tfd��Y}|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(RR�tobjectt__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`R�N(R�R�R�(tregistryR]tt((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�v s% cC@s8tjj|�}tjj|�s4tj|�ndS(s1Ensure that the parent directory of `path` existsN(R�R�R�R tmakedirs(R�R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyR�} scC@s^tstd��nt|�\}}|rZ|rZt|� rZt|�t|d�ndS(s/Sandbox-bypassing version of ensure_directory()s*"os.mkdir" not supported on this platform.i�N(R�R�R R RtR(R�R�R�((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyRt� s  cc@s�d}g}x�t|�D]y}|jd�r�|jd�rs|sI|rW||fVn|dd!j�}g}q�td|��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]ii����sInvalid section headingN(RaR�R4RR(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(R�R 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)R�t email.parserR�R�RkRRRJR�timpt pip._vendorRtpip._vendor.six.movesRRRRRRR R�R�R�R R�tos.pathR R timportlib.machineryt machineryR�RRaR RR�t version_infoR�R?RrR�R@RR�RRER�RCR�RDRHRKRPRVRXR[R^R_R`t _sget_nonet _sset_noneRqt__all__t ExceptionR�R�R�R�R�R�RfR�R�R�R�R�R�RtRlR�RfR;RgR�R�R�RsR�RuRvRwRxR�R�R�RLR(R�R�t RuntimeErrorR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�R�R�R�R�RRR!R/t ImpImporterR�R0R�R=R:R�R�RORPR�R#R�R8R�RhRZR<t IGNORECASER�R�RvR|R�R�R�R�R�RnR�R�R1R�R�R�R�RtR�R�tfilterwarningsR�RIR�R�(((sF/usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyts�                               +b                                  .    �z��    a   �'      .    !        ~ �f/   5