/usr/lib/python2.6/site-packages/pkg_resources
NameSizeModeActions
extern/-0755rm
_vendor/-0755rm
__init__.py1013580644editdlrm
__init__.pyc1143900644editdlrm
Edit: /usr/lib/python2.6/site-packages/pkg_resources/__init__.pyc (114390B)
Wcm@@sk dZddklZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZddkZddkZddkZddkZddkZddkZddkZddklZyddkZWnej oddkZnXddklZddklZlZl Z ddkl!Z!y&ddkl"Z"l#Z#l$Z$e%Z&Wnej o e'Z&nXdd kl(Z)dd k*l+Z+l,Z,yddk-i.Z/e/i0Wnej o e1Z/nXdd kl2Z2e3d e3d e3de3dddfei4joddfjnodZ5e i6e5ne1Z7e1Z8de9fdYZ:de;fdYZ<de<e2i=i>fdYZ?de<e2i=i@fdYZAdZBhZCdZDdZEdZFdZGdZHd ZId!ZJd"ZKZLd#ZMd$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCddDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhgFZNd?eOfdiYZPd@ePfdjYZQdkeQfdlYZRdAePfdmYZSdBePfdnYZThZUei=d ZVdZWdoZXdpZYdZZdqZ[drZ\dsZ]gdtZ^duZ_dvZ`eiadwZbeiadxZce`ZddyZedzZfefZgd{Zhd|Zie1d}Zjd~ZkdWfdYZldXelfdYZmd:e;fdYZndeofdYZpd9e;fdYZqeqZrdCesfdYZtd;fdYZudZvdZwdZxdZydZzdZ{e1dZ|d^fdYZ}e\e;e}d_e}fdYZ~d`e~fdYZeid\e}fdYZeZdeofdYZdefdYZde ifdYZdae~fdYZe\e iedYefdYZdZefdYZd[efdYZeDddhdZe'dZe'dZee iee'dZee;ee'dZeeieee/doee/ieneDddheDddhdZdZdZdZe1dZdZeeieee ieee/doee/iendZee;edZhdZdZdZdZeiadiZeiadeieiBiZd>e;fdYZdZdZd<e;fdYZdefdYZdefdYZhed6ed6ed6ZdZdefdYZdZd=e2iifdYZdZdZdZdZdZdZe idde: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(t packagings&pkg_resources.extern.packaging.versions)pkg_resources.extern.packaging.specifierss+pkg_resources.extern.packaging.requirementss&pkg_resources.extern.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__(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRXst_SetuptoolsVersionMixincB@sYeZdZdZdZdZdZdZdZdZ dZ RS( cC@stt|iS(N(tsuperRt__hash__(tself((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRascC@s;t|tot||jStt|i|SdS(N(t isinstancettupleRRt__lt__(Rtother((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRdscC@s;t|tot||jStt|i|SdS(N(RRRRt__le__(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRjscC@s;t|tot||jStt|i|SdS(N(RRRRt__eq__(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRpscC@s;t|tot||jStt|i|SdS(N(RRRRt__ge__(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRvscC@s;t|tot||jStt|i|SdS(N(RRRRt__gt__(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR|scC@s;t|tot||jStt|i|SdS(N(RRRRt__ne__(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@st||S(N(R(Rtkey((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt __getitem__sc#@stidtihdd6dd6dd6dd6dd 6ifd fd }tid td dx|t|D] }|VqWdS(Ns(\d+ | [a-z]+ | \.| -)tctpretpreviewsfinal-t-trct@tdevc3@szxni|D]]}||}| p |djoqn|d djo|idVqd|VqWdVdS(Nt.it 0123456789it*s*final(R tzfill(tstpart(treplacet component_re(s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_parse_version_partss c@sg}x|iD]}|idoi|djo.x+|o|ddjo|iq?Wnx+|o|ddjo|iqmWn|i|qWt|S(NR*s*finalis*final-t00000000(tlowert startswithtpoptappendR(R,tpartsR-(R0(s:/tmp/pip-build-iUCeBS/setuptools/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(RR7R-((R0R.R/s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__iter__s  ( RRRRRRRRRR RA(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR_s        tSetuptoolsVersioncB@seZRS((RR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRBstSetuptoolsLegacyVersioncB@seZRS((RR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRCscC@s5yt|SWn tiij ot|SXdS(N(RBR tversiontInvalidVersionRC(tv((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt parse_versionscK@s-ti|titi||dS(N(tglobalstupdatet _state_varstdicttfromkeys(tvartypetkw((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_declare_statescC@sLh}t}x6tiD](\}}|d|||||scC@st}ti|}|dj oWtidjoGy-dditd |idf}Wq|t j oq|Xn|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_platformtmacosVersionStringtmatchR`tsystplatformtjoint _macosx_verstgroupt ValueError(tplattm((s:/tmp/pip-build-iUCeBS/setuptools/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_requirementsRGt 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|iit|iS(N(t __class__RtreprRa(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__repr__<s(RRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR:scB@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 |idS(Ni(Ra(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytdistJscC@s |idS(Ni(Ra(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytreqNscC@s|iitS(N(t _templatetformattlocals(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytreportRscC@s&|p|S|i|f}t|S(st If required_by is non-empty, return a version of self that is a ContextualVersionConflict. (RatContextualVersionConflict(Rt required_byRa((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt with_contextUs( RRRRtpropertyRRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR@s  RcB@s*eZdZeidZedZRS(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 |idS(Ni(Ra(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRhs(RRRRRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR`s 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 |idS(Ni(Ra(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRsscC@s |idS(Ni(Ra(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt requirerswscC@s|ipdSdi|iS(Nsthe applications, (RRi(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt requirers_str{s cC@s|iitS(N(RRR(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s |iS(N(R(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__str__s( RRRRRRRRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRms cB@seZdZRS(s>Distribution doesn't have an "extra feature" of the given name(RRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRsiiicC@s|t|eZdZdZdZdZdZdZRS(cC@sdS(s;Does the package's distribution contain the named metadata?N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt has_metadata+scC@sdS(s'The named metadata resource as a stringN((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt get_metadata.scC@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((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytget_metadata_lines1scC@sdS(s>Is the named metadata a directory? (like ``os.path.isdir()``)N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytmetadata_isdir7scC@sdS(s?List of metadata names in the directory (like ``os.listdir()``)N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytmetadata_listdir:scC@sdS(s=Execute the named script in the supplied namespace dictionaryN((Rt namespace((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRq=s(RRRRRRRRq(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR)s      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((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytget_resource_filenameDscC@sdS(siReturn a readable file-like object for `resource_name` `manager` must be an ``IResourceManager``N((RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytget_resource_streamIscC@sdS(smReturn a string containing the contents of `resource_name` `manager` must be an ``IResourceManager``N((RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytget_resource_stringNscC@sdS(s,Does the package contain the named resource?N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt has_resourceSscC@sdS(s>Is the named resource a directory? (like ``os.path.isdir()``)N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR}VscC@sdS(s?List of resource names in the directory (like ``os.listdir()``)N((R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR{Ys( RRRRRRRR}R{(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRAs     cB@seZdZddZedZedZdZdZ dZ ddZ dZ d Z deed Zdded Zdded Zd ZdZdZdZdZRS(sDA collection of active distributions on sys.path (or a similar list)cC@s`g|_h|_h|_g|_|djo ti}nx|D]}|i|qEWdS(s?Create working set from list of path entries (default=sys.path)N(tentriest entry_keystby_keyt callbacksR`RgRt add_entry(RRtentry((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__init__`s      c C@si|}yddkl}Wntj o|SXy|i|Wntj o|i|SX|S(s1 Prepare the master working set. i(t __requires__(t__main__RRRpRt_build_from_requirements(tclstwsR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt _build_masterms cC@s|g}t|}|i|t}x|D]}|i|q4Wx2tiD]'}||ijo|i|qUqUW|iti(|S(sQ Build a working set from a requirement spec. Rewrites sys.path. (RtresolveRtaddRgRRR (Rtreq_specRtreqstdistsRR ((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs    cC@sT|ii|g|ii|x*t|tD]}|i||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(Rt setdefaultRR5RRRR(RR R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cC@s|ii|i|jS(s9True if `dist` is the active distribution for its project(R R<R(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt __contains__scC@sF|ii|i}|dj o ||jot||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<RR`R(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cc@skxd|D]\}|i|}|djo x7|iD] }|Vq6Wq||jo ||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(RuR`tvalues(RRkRRRtep((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRws    cC@sQtidi}|d}|i||d<|i|di||dS(s?Locate distribution for `requires` and run `script_name` scriptiRiN(RgRRR[RpRq(RtrequiresRRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRqs    cc@sth}xg|iD]\}||ijoqnx<|i|D]-}||jod||<|i|Vq;q;WqWdS(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(RRR (RtseentitemR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRAs   cC@s|o|i|i|d|n|djo |i}n|ii|g}|ii|ig}| o|i|ijodS||i|i<|i|jo|i|in|i|jo|i|in|i |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. R.N( t insert_onRR`tlocationRRRR R5t _added_new(RRR tinsertR.tkeystkeys2((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs   cC@s6t|ddd}h}h}g}t}tit} x|o|id} | |joqFn|i| pqFn|i| i} | djo|i i| i} | djp| | jo|o|} |djo<| djot |i }q+t g}t g} n|i| | |} || i<| djo%| i| d} t| | qn|i| n| | jo&| | }t| | i|n| i| iddd}|i|x/|D]'}| |i| i| i|| Map each requirement to the extras that demanded it. c@s;fd|iddD}i p t|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,x%|]}iih|d6VqWdS(textraN(tmarkertevaluate(t.0RK(R(s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pys s (N(N(R<R`RLtany(RRt extra_evals((Rs:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR+s (RRRR+(((s:/tmp/pip-build-iUCeBS/setuptools/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,h|_||_||_|i|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_distmapRhtpythontscan(Rt search_pathRhRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s   cC@sF|idjp#|idjp|i|ijot|i|iS(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(RRR`t py_versionRRh(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytcan_adds cC@s|i|ii|dS(s"Remove `dist` from the environmentN(RQRtremove(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRW scC@sS|djo ti}nx2|D]*}x!t|D]}|i|q4Wq!WdS(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(R`RgRRR(RRTRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRS s   cC@s|i}|ii|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. (R2RQR<(RR/tdistribution_key((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cC@sz|i|of|ioY|ii|ig}||jo0|i||idtiddt qvndS(sLAdd `dist` if we ``can_add()`` it and it has not already been added RthashcmptreverseN( RVt has_versionRQRRR5R;toperatort attrgetterR(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR's   cC@s[|i|}|dj o|Sx'||iD]}||jo|Sq/W|i||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(RR`Rtobtain(RRRR2R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR,0s    cC@s|dj o ||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(R`(Rt requirementR2((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR^Fs cc@s2x+|iiD]}||o |VqqWdS(s=Yield the unique project names of the available distributionsN(RQR$(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRARs cC@st|to|i|n[t|to7xG|D](}x||D]}|i|qIWq8Wntd|f|S(s2In-place addition of a distribution or environmentsCan't add %r to environment(RRRRR(RRtprojectR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__iadd__Xs cC@s@|igdddd}x||fD]}||7}q(W|S(s4Add an environment or distribution to an environmentRhRRN(RR`(RRtnewR1((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt__add__ds  N(RRRR`RotPY_MAJORR RVRWRSR RR,R^RARaRc(((s:/tmp/pip-build-iUCeBS/setuptools/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(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRps cB@seZdZdZdZdZdZdZdZ dZ dZ dZ dd Z ed Zd Zd Zed ZRS(s'Manage resource extraction and packagescC@s h|_dS(N(t cached_files(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@st|i|S(sDoes the named resource exist?(RrR(Rtpackage_or_requirementR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR|scC@st|i|S(s,Is the named resource an existing directory?(RrR}(RRfR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR}s cC@st|i||S(s4Return a true filesystem path for specified resource(RrR(RRfR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRzs cC@st|i||S(s9Return a readable file-like object for specified resource(RrR(RRfR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRys cC@st|i||S(s%Return specified resource as a string(RrR(RRfR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRxs cC@st|i|S(s1List the contents of the named resource directory(RrR{(RRfR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR{s cC@sutid}|ipt}tidi}t|it }||_ ||_ ||_ |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( Rgtexc_infotextraction_pathRttextwraptdedenttlstripRRRRt cache_pathtoriginal_error(Rtold_excRlttmplterr((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytextraction_errors   cC@so|ipt}tii||d|}yt|Wn|inX|i|d|i|<|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( RhRRRRit_bypass_ensure_directoryRqt_warn_unsafe_extraction_pathRe(Rt archive_nametnamest extract_patht target_path((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytget_cache_paths   cC@s}tidjo|itid odSti|i}|ti@p|ti@od|}ti |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).( RRR3tenvirontstattst_modetS_IWOTHtS_IWGRPR=R>t UserWarning(Rtmodetmsg((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRss (cC@sBtidjo.ti|idBd@}ti||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|R}tchmod(RttempnametfilenameR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt postprocessscC@s'|iotdn||_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(ReRlRh(RR((s:/tmp/pip-build-iUCeBS/setuptools/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((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR$sN((RRRR`RhR R|R}RzRyRxR{RqRxt staticmethodRsRRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs           c C@sytidSWntj onXtidjotiidSd}dd|fd|fd|fdd|fg}x|D]\}}d }xr|D]7}|tijo tii|ti|}qPqW|otii||}ntii|d SqWtd dS(s Determine the default cache location This returns the ``PYTHON_EGG_CACHE`` environment variable, if set. Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the "Application Data" directory. On all other systems, it's "~/.python-eggs". tPYTHON_EGG_CACHERys~/.python-eggssApplication DatatAPPDATAt USERPROFILEt HOMEDRIVEtHOMEPATHtHOMEtWINDIRRs Python-Eggss3Please set the PYTHON_EGG_CACHE enviroment variableN(sAPPDATA((sAPPDATAN(s USERPROFILE(s HOMEDRIVEsHOMEPATH(sHOMEPATH(sHOME((sHOMEN(sWINDIR( RR{RRRt expanduserR`Rit RuntimeError(tapp_datat app_homesR$tsubdirtdirnameR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR1s4     cC@stidd|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$(R9tsub(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR]scC@s\yttii|SWn;tiij o)|idd}tidd|SXdS(sB Convert an arbitrary string to a standard version string RR(s[^A-Za-z0-9.]+R$N(R@R RDtVersionRER.R9R(RD((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRes cC@stidd|iS(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(R9RR2(RK((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRqscC@s|iddS(s|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. R$R(R.(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRzscC@s=yt|Wn(tj o}d|_d|_|SXtS(so Validate text as a PEP 508 environment marker; return an exception if invalid or False otherwise. N(Rt SyntaxErrorR`RtlinenoR(ttextte((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs  cC@sNy tii|}|iSWn'tiij o}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(R tmarkerstMarkerRMt InvalidMarkerR(RRKRLR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cB@seZdZdZdZdZdZdZdZ dZ dZ dZ e idjo dZn d Zd Zd Zd Zd ZdZdZdZdZdZdZdZRS(sETry to implement resources and metadata for arbitrary PEP 302 loaderscC@s:t|dd|_tiit|dd|_dS(NRt__file__R(RR`RRRRt module_path(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@s|i|i|S(N(t_fnR(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@sti|i||S(N(tiotBytesIOR(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s|i|i|i|S(N(t_getRR(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s|i|i|i|S(N(t_hasRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s&|io|i|i|i|S(N(tegg_infoRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRsicC@s+|ipdS|i|i|i|S(NR(RRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cC@s4|ipdS|i|i|i|idS(NRsutf-8(RRRtdecode(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cC@st|i|S(N(RR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s|i|i|i|S(N(t_isdirRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR}scC@s&|io|i|i|i|S(N(RRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscC@s|i|i|i|S(N(t_listdirRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR{scC@s+|io|i|i|i|SgS(N(RRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs c B@s"d|}|i|ped|n|i|idd}|idd}|i|i|}||dVs N(tContextualZipFileRRtnamelistRK(RRRRQ((Rs:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytbuildKs # (RRRRJRtload(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRFstMemoizedZipManifestscB@s)eZdZeiddZdZRS(s% Memoized zipfile manifests. t manifest_modsmanifest mtimecC@sytii|}ti|i}||jp||i|jo)|i|}|i||||"os.rename" and "os.unlink" are not supported on this platforms .$extracttdirRy(t_indexRRRRiRRRt WRITE_SUPPORTtIOErrorRxRRt _is_currentt_mkstemptwriteRRRRRRterrortisfileRR Rq( RRRRtlastRRt real_pathtoutfttmpnam((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRsB$     c C@s|i|i|\}}tii|ptSti|}|i|jp|i|jotS|i i |}t |di i }z|~}|i} WdQX|| jS(sK Return True if the file_path is current for this zip_path RN(RRRRRRR|tst_sizeRRRR RRR( Rt file_pathRRRR|t zip_contentsRtft file_contents((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs &cC@se|idjoNg}x8dD]0}|i|o|i|i|qqW||_n|iS(Nsnative_libs.txtseager_resources.txt(snative_libs.txtseager_resources.txt(RR`RR.R(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cC@sy |iSWntj oh}x|iD]w}|iti}x\|oTtii|d }||jo||i|dPqG|ig||[^-]+) ( -(?P[^-]+) ( -py(?P[^-]+) ( -(?P.+) )? )? )? cB@seZdZd d ddZdZdZedZdZ dddZ e i dZ eddZed Zedd Zedd ZRS(s3Object representing an advertised importable objectcC@spt|ptd|n||_||_t||_tiddi|i |_ ||_ dS(NsInvalid module namesx[%s]t,( tMODULERlRt module_nameRtattrsRRRiR-R(RRRYRZR-R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s   "cC@sjd|i|if}|io|ddi|i7}n|io|ddi|i7}n|S(Ns%s = %st:R(s [%s]RW(RRYRZRiR-(RR,((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs   cC@sdt|S(NsEntryPoint.parse(%r)(R@(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRscO@sU| p|p|otidtddn|o|i||n|iS(sH Require packages for this EntryPoint, then resolve it. sJParameters to load are deprecated. Call .resolve and .require separately.R8i(R=R>tDeprecationWarningRpR(RRpRaR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cC@sft|iddgdd}ytit|i|SWn'tj o}tt|nXdS(sD Resolve the entry point from its module and attrs. tfromlistRtleveliN( RRYt functoolstreduceRRZR RR@(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs cC@sl|io|i otd|n|ii|i}ti|||}ttti|dS(Ns&Can't require() without a distribution( R-RRRRRR&RR(RR1R2RRQ((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRps s]\s*(?P.+?)\s*=\s*(?P[\w.]+)\s*(:\s*(?P[\w.]+))?\s*(?P\[.*\])?\s*$cC@s|ii|}|pd}t||n|i}|i|d}|do|didnd}||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((tpatternRfRlt groupdictt _parse_extrasR (RtsrcRRnRtresR-RZ((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs  %cC@s=|pdStid|}|io tn|iS(Ntx((RRtspecsRlR-(Rt extras_specR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRds   cC@st|ptd|nh}x\t|D]N}|i||}|i|jotd||in|||i '{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(R RDt LegacyVersionRRRiRjR)R.R=R>RtvarsR(RtLVt is_legacyRo((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_warn_legacy_version~ s  cC@sky |iSWnYtj oMt|i|i}|djo d}t||i|n|SXdS(Ns(Missing 'Version:' header and/or %s file(R{R Ryt _get_metadatatPKG_INFOR`Rl(RRDRo((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRD s  cC@sy |iSWntj ohgd6}|_xdD]}xt|i|D]\}}|ond|joJ|idd\}}t|o g}qt|p g}qnt|pd}n|i |gi t |qSWq7W|SXdS(Ns requires.txts depends.txtR[i(s requires.txts depends.txt( t_Distribution__dep_mapR R`RRR RRRRR.R(RtdmRRKRRL((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_dep_map s$      'cC@s|i}g}|i|iddxU|D]M}y|i|t|Wq/tj otd||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<R`RRR(RR-RtdepsR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cc@s7|i|o#x |i|D] }|Vq WndS(N(RR(RRR.((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@s|djo ti}n|i|dt|tijoIt|ix9|idD]$}|tijot |qZqZWndS(s>Ensure distribution is importable on `path` (default=sys.path)R.snamespace_packages.txtN( R`RgRR RRR!RRR~(RRtpkg((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytactivate s   cC@sRdt|it|i|iptf}|io|d|i7}n|S(s@Return what this distribution's standard .egg filename should bes %s-%s-py%sR$(RR/RDRURdRh(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s  cC@s*|iod||ifSt|SdS(Ns%s (%s)(R!R@(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cC@sPyt|dd}Wntj o d}nX|pd}d|i|fS(NRDs[unknown version]s%s %s(RR`RlR/(RRD((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s   cC@s0|idot|nt|i|S(sADelegate all unrecognized public attributes to .metadata providerR(R3R RR|(RRa((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt __getattr__ scK@s(|it|tii|||S(N(R'R$RRR(RRRRN((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@sVt|itiiod|i|if}nd|i|if}ti|S(s?Return a ``Requirement`` that matches this distribution exactlys%s==%ss%s===%s(RRR RDRR/RR(Rtspec((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR< scC@sF|i||}|djotd||ffn|iS(s=Return the `name` entry point of `group` or raise ImportErrorsEntry point %r not foundN(RvR`RR(RRkRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRt s cC@sgy |i}Wn5tj o)ti|id|}|_nX|dj o|i|hS|S(s=Return the entry point map for `group`, or the full entry mapsentry_points.txtN(t_ep_mapR RRoRR`R<(RRktep_map((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRu s ! cC@s|i|i|S(s<Return the EntryPoint object for `group`+`name`, or ``None``(RuR<(RRkR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRv sc C@s|p|i}|pdSt|}tii|}g}|D]!}||o t|p|qE~}xt|D]~\}} | |joPq|| |joS|itjoC|tijo|i n|i |||i ||Pq|q|W|tijo|i n|o|i d|n|i |dSxQt oIy|i ||d} Wntj oPqKX|| =|| =| }qKWdS(s@Insert self.location in path before its nearest parent directoryNii(R!R$RRRt enumerateR#RRgtcheck_version_conflictR#R5RR?Rl( RRtlocR.tnloctbdirRRFtnpathRtnp((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR  s> 5     cC@s |idjodSti|id}t|i}x|idD]}|tijp||jp |tjoqLn|djoqLnt ti|dd}|o0t|i |p|i |ioqLnt d|||ifqLWdS( Nt setuptoolssnamespace_packages.txts top_level.txtt pkg_resourcestsiteRsIModule %s was already imported from %s, but %s is being added to sys.path(s pkg_resourcess setuptoolsssite( RRKRLRRR!RgRR2RR`R3t issue_warning(RtnspRtmodnametfn((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRF s$  cC@s:y |iWn(tj otdt|tSXtS(NsUnbuilt egg for (RDRlRRRR(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR[\ s  cK@sYd}x0|iD]"}|i|t||dqW|id|i|i|S(s@Copy this distribution, substituting in any changed keyword argss<project_name version py_version platform location precedenceRN(R RRR`R|R(RRNRuRa((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pytcloned s   cC@s-g}|iD]}|o ||qq~S(N(R(RRtdep((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR-l sN((+RRRRR`RdRR RJR'RRRYRRRRRRRRRRRDRRRRRRRRRR<RtRuRvRR RR[RR-(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR$ sN                    +   tEggInfoDistributioncB@seZdZRS(cC@s0t|i|i}|o ||_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. (RyRRR{(Rt md_version((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRs s  (RRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRq stDistInfoDistributioncB@sJeZdZdZeidZedZedZ dZ RS(sGWrap an actual or potential sys.path entry w/metadata, .dist-info styletMETADATAs([\(,])\s*(\d.*?)\s*([,\)])cC@sVy |iSWnDtj o8|i|i}tiii||_|iSXdS(sParse and cache metadataN(t _pkg_infoR RRtemailtparsertParsertparsestr(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_parsed_pkg_info s  cC@s8y |iSWn&tj o|i|_|iSXdS(N(t_DistInfoDistribution__dep_mapR t_compute_dependencies(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s  c@shgd6}|_gx4|iidpgD]}it|q4Wfd}t|d}|di|xS|iidpgD]8}t|i}t t|||||(RaRNR^RS((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s tRequirementParseErrorcB@seZdZRS(cC@sdi|iS(NR(RiRa(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s(RRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scc@stt|}xq|D]i}d|jo||id }n|ido$|d i}|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(RuRRRR)RtR(RURjR.((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cB@sMeZdZdZdZdZdZdZedZ RS(c C@s ytt|i|Wn-tiij o}tt|nX|i|_ t |i}||i |_ |_ g}|iD]}||i|ifq~|_ttt|i|_|i |it|i|iot|indf|_t|i|_dS(s>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!N(RRR R R0tInvalidRequirementRR@Rt unsafe_nameRR2R/Rt specifierR\RDRhRRRR-RRLR`thashCmpRt_Requirement__hash(Rtrequirement_stringRR/RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR  s 3 &cC@s t|to|i|ijS(N(RRR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@s ||j S(N((RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@sKt|to%|i|ijotS|i}n|ii|dtS(Nt prereleases(RRRRRDRtcontainsR(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s  cC@s|iS(N(R(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@sdt|S(NsRequirement.parse(%r)(R@(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR scC@st|\}|S(N(R(R,R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s( RRR RRRRRRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s     cC@s<t|tp%d|tfdY}|idS|iS(s&Get an mro for a type or classic classRcB@seZRS((RR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR si(RRtobjectt__mro__(R((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt_get_mro s cC@sCx<tt|dt|D]}||jo ||SqWdS(s2Return an adapter factory for `ob` from `registry`RN(RRR(tregistryR\tt((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR s cC@s:tii|}tii|pti|ndS(s1Ensure that the parent directory of `path` existsN(RRRR tmakedirs(RR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR# scC@sdtptdnt|\}}|o0|o)t| ot|t|dndS(s/Sandbox-bypassing version of ensure_directory()s*"os.mkdir" not supported on this platform.iN(RRR R RrR(RRR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRr* s  cc@sd}g}xt|D]}|ido]|ido:|p|o||fVn|dd!i}g}qtd|q|i|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(R`RR3RR)RlR5(R,tsectiontcontentR.((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyR4 s  cO@s7ti}ztt_ti||SWd|t_XdS(N(RR tos_openttempfiletmkstemp(RaRNtold_open((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyRM s   tignoretcategoryR5cO@s||||S(N((RRaR((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyt _call_aside` s cC@sUt}||dRpRR?RRRRDRRBRRCRGRJRORURWRZR]R^R_t _sget_nonet _sset_noneRot__all__t ExceptionRRRRRRRdRRRRRRRrRjRRdR:ReRRRRqRRsRtRuRvRRRRKR'RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"R/t ImpImporterRR0RR=R:R~RRMRNRR$RR8RRfRXR;t IGNORECASERRRsRyRRRRRRlRRR0RRRRRrRRtfilterwarningsRRHRR(((s:/tmp/pip-build-iUCeBS/setuptools/pkg_resources/__init__.pyts                           -c                                  .    t ,    e   #     (            ~ N/   5