7Recn@sO dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddl mZyddlmZmZWn(ek rddlmZmZYnXyeWn"ek r;ddlmZYnXy$eddZddlmZWn:ek reZdd lmZe e d d Z!YnXdd lm"Z"y&dd lm#Z#m$Z$m%Z%e&Z'Wnek re(Z'YnXddlm)Z*ddl+m,Z,m-Z-ej.ddfko8ej/j0dkrMddl1j2Z3ne Z3yddl4Z4Wnek rwYnXdddZ5iZ6ddZ7ddZ8ddZ9ddZ:ddZ;dd Z<d!d"Z=d#dZ>Z?d$d%Z@d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjgEZAGdkdAdAeBZCGdldBdBeCZDGdmdCdCeCZEGdndDdDeCZFiZGejHddZIdZJdoZKdpZLdZMdp ZNdqdfZOdrd(ZPgdsdtZQdudvZRdwdxZSejTdyZUejTdzZVeSZWd{dKZXd|d'ZYeYZZd}d)Z[d~d*Z\e dd+Z]dd,Z^GddYdYZ_GddZdZe_Z`Gdd<d<eaZbGdd;d;eaZcecZdGddEdEeeZfGdd=d=Zgdd:ZhddHZiddIZjddNZkddOZlGdddeaZmemjnZoemjpZpGdd`d`ZqeOeaeqGddadaeqZrGddbdberZseOete ese3e k r|eOe3juesnGdd^d^eqZvevZwddZxGddcdcerZyeOejzeyGdd[d[evZ{Gdd\d\esZ|Gdd]d]eyZ}e7ddidddZ~e(dd7Ze(ddZe~ejzee(ddZe~eaee(ddZe~e jee3e k re~e3jene7ddie7ddiddeZddZdd4Ze ddgZddZee jeeejzee3e k rQee3jenddZeeaeddSZiddZddZddLZejTdjZejTdjZejTdjZejTdjZejTdjZejTdjZejTdjZejTdjZejTdejejBjZejTdejZidd6dd6dd6dd6dd6jZddZddGZGdd@d@eaZddZGdd>d>eaZGdddeZied6ed6ed6ZddZddFZddZGdd?d?Zidd6dd6dd6dd6dd6dd6ZddZddZddRZddMZddZegZddZeeebjZe7dd5eejZejZejZejYZYeYZZeddge_eeejejdS(uZ 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. iN(u get_importer(uurlparseu urlunparse(u ImmutableSetcCs |jS(N(unext(uo((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu-su(uStringIO(uBytesIOcCsY|dkrt}n|dkr-|}nttt|j|d||dS(Nuexec(uNoneuglobalsuexecucompileuopenuread(ufnuglobsulocs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuexecfile2s     uexecfile(uutime(umkdirurenameuunlink(uopen(uisdirusplitiucpythonicCs^tstdnt|\}}|rZ|rZt| rZt|t||ndS(Nu*"os.mkdir" not supported on this platform.(u WRITE_SUPPORTuIOErrorusplituisdiru_bypass_ensure_directoryumkdir(unameumodeudirnameufilename((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_bypass_ensure_directoryPs  u_bypass_ensure_directorycKs-tj|tjtj||dS(N(uglobalsuupdateu _state_varsudictufromkeys(uvartypeukw((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_declare_state\su_declare_statecCsLi}t}x6tjD](\}}|d|||||zsc Cst}tj|}|dk r~tjdkr~y3ddjtdd|jdf}Wq~t k rzYq~Xn|S(uZReturn 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. udarwinu macosx-%s-%su.Nii( uget_build_platformumacosVersionStringumatchuNoneusysuplatformujoinu _macosx_versugroupu ValueError(uplatum((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_supported_platform}s 3 uget_supported_platformurequireu run_scriptu get_provideruget_distributionuload_entry_pointu get_entry_mapuget_entry_infouiter_entry_pointsuresource_stringuresource_streamuresource_filenameuresource_listdiruresource_existsuresource_isdirudeclare_namespaceu working_setuadd_activation_listenerufind_distributionsuset_extraction_pathucleanup_resourcesuget_default_cacheu Environmentu WorkingSetuResourceManageru Distributionu Requirementu EntryPointuResolutionErroruVersionConflictuDistributionNotFoundu UnknownExtrauExtractionErroruparse_requirementsu parse_versionu safe_nameu safe_versionu get_platformucompatible_platformsu yield_linesusplit_sectionsu safe_extrau to_filenameuinvalid_markeruevaluate_markeruensure_directoryunormalize_pathuEGG_DISTu BINARY_DISTu SOURCE_DISTu CHECKOUT_DISTu DEVELOP_DISTuIMetadataProvideruIResourceProvideru FileMetadatau PathMetadatau EggMetadatau EmptyProvideruempty_provideru NullProvideru EggProvideruDefaultProvideru ZipProvideruregister_finderuregister_namespace_handleruregister_loader_typeufixup_namespace_packagesu get_importerurun_mainuAvailableDistributionscBs&|EeZdZdZddZdS(uResolutionErroru.Abstract base for dependency resolution errorscCs|jjt|jS(N(u __class__u__name__urepruargs(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__suResolutionError.__repr__N(u__name__u __module__u __qualname__u__doc__u__repr__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuResolutionErrorscBs|EeZdZdZdS(uVersionConflictuAAn already-installed version conflicts with the requested versionN(u__name__u __module__u __qualname__u__doc__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuVersionConflictscBs|EeZdZdZdS(uDistributionNotFoundu&A requested distribution was not foundN(u__name__u __module__u __qualname__u__doc__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDistributionNotFoundscBs|EeZdZdZdS(u UnknownExtrau>Distribution doesn't have an "extra feature" of the given nameN(u__name__u __module__u __qualname__u__doc__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu UnknownExtrasiicCs|t|Is the named metadata a directory? (like ``os.path.isdir()``)N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_isdirxsu IMetadataProvider.metadata_isdircCsdS(u?List of metadata names in the directory (like ``os.listdir()``)N((uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_listdir{su"IMetadataProvider.metadata_listdircCsdS(u=Execute the named script in the supplied namespace dictionaryN((u script_nameu namespace((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu run_script~suIMetadataProvider.run_scriptN( u__name__u __module__u __qualname__u has_metadatau get_metadatauget_metadata_linesumetadata_isdirumetadata_listdiru run_script(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuIMetadataProviderjs      cBsb|EeZdZdZddZddZddZdd Zd d Zd d Z dS(uIResourceProvideru3An object that provides access to package resourcescCsdS(udReturn a true filesystem path for `resource_name` `manager` must be an ``IResourceManager``N((umanageru resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_filenamesu'IResourceProvider.get_resource_filenamecCsdS(uiReturn a readable file-like object for `resource_name` `manager` must be an ``IResourceManager``N((umanageru resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_streamsu%IResourceProvider.get_resource_streamcCsdS(umReturn a string containing the contents of `resource_name` `manager` must be an ``IResourceManager``N((umanageru resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_stringsu%IResourceProvider.get_resource_stringcCsdS(u,Does the package contain the named resource?N((u resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu has_resourcesuIResourceProvider.has_resourcecCsdS(u>Is the named resource a directory? (like ``os.path.isdir()``)N((u resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdirsu IResourceProvider.resource_isdircCsdS(u?List of resource names in the directory (like ``os.listdir()``)N((u resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdirsu"IResourceProvider.resource_listdirN( u__name__u __module__u __qualname__u__doc__uget_resource_filenameuget_resource_streamuget_resource_stringu has_resourceuresource_isdiruresource_listdir(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuIResourceProviders     cBs|EeZdZdZd$ddZeddZeddZdd Z d d Z d d Z d$ddZ ddZ ddZd$d%d&ddZd$d$d&ddZd$d$d%ddZddZddZddZd d!Zd"d#Zd$S('u WorkingSetuDA collection of active distributions on sys.path (or a similar list)cCs^g|_i|_i|_g|_|dkr<tj}nx|D]}|j|qCWdS(u?Create working set from list of path entries (default=sys.path)N(uentriesu entry_keysuby_keyu callbacksuNoneusysupathu add_entry(uselfuentriesuentry((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__s       uWorkingSet.__init__cCsm|}yddlm}Wntk r5|SYnXy|j|Wntk rh|j|SYnX|S(u1 Prepare the master working set. i(u __requires__(u__main__u __requires__u ImportErrorurequireuVersionConflictu_build_from_requirements(uclsuwsu __requires__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _build_masters    uWorkingSet._build_mastercCs|g}t|}|j|t}x|D]}|j|q4Wx0tjD]%}||jkrU|j|qUqUW|jtjdd<|S(uQ Build a working set from a requirement spec. Rewrites sys.path. N(uparse_requirementsuresolveu Environmentuaddusysupathuentriesu add_entry(uclsureq_specuwsureqsudistsudistuentry((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_build_from_requirementss   u#WorkingSet._build_from_requirementscCsT|jj|g|jj|x*t|dD]}|j||dq3WdS(uAdd 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``.) NTF(u entry_keysu setdefaultuentriesuappendufind_distributionsuTrueuadduFalse(uselfuentryudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu add_entrys uWorkingSet.add_entrycCs|jj|j|kS(u9True if `dist` is the active distribution for its project(uby_keyugetukey(uselfudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu __contains__suWorkingSet.__contains__cCsG|jj|j}|dk r?||kr?t||n|SdS(uFind 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(uby_keyugetukeyuNoneuVersionConflict(uselfurequdist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyufinds uWorkingSet.findccsgx`|D]X}|j|}|dkrGx4|jD] }|Vq5Wq||kr||VqqWdS(uYield 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(u get_entry_mapuNoneuvalues(uselfugroupunameudistuentriesuep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuiter_entry_pointss    uWorkingSet.iter_entry_pointscCsQtjdj}|d}|j||d<|j|dj||dS(u?Locate distribution for `requires` and run `script_name` scriptiu__name__iN(usysu _getframeu f_globalsuclearurequireu run_script(uselfurequiresu script_nameunsuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu run_script s    uWorkingSet.run_scriptccspi}xc|jD]X}||jkr+qnx:|j|D]+}||kr9d||<|j|Vq9q9WqWdS(uYield 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(uentriesu entry_keysuby_key(uselfuseenuitemukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iter__s  uWorkingSet.__iter__cCs|r|j|j|n|dkr4|j}n|jj|g}|jj|jg}| r~|j|jkr~dS||j|j<|j|kr|j|jn|j|kr|j|jn|j |dS(uAdd `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. N( u insert_onuentriesuNoneulocationu entry_keysu setdefaultukeyuby_keyuappendu _added_new(uselfudistuentryuinsertureplaceukeysukeys2((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuadd#s   uWorkingSet.addc Cst|ddd}i}i}g}xc|r|jd}||krUq.n|j|j} | dkr?|jj|j} | dks| |kr/|r/|} |dkr| dkrt|j}qtg}tg} n|j || |} ||j<| dkr/t |q/n|j | n| |kr]t | |n|j | j|jdddd||gSYnX||jkrw|j|}|j|s   uEnvironment.addcCsW|j|}|dk r|Sx%||jD]}||kr-|Sq-W|j||S(uFind 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(ufinduNoneukeyuobtain(uselfurequ working_setu installerudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu best_matchGs   uEnvironment.best_matchcCs|dk r||SdS(uObtain 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(uNone(uselfu requirementu installer((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuobtain\s uEnvironment.obtainccs0x)|jjD]}||r|VqqWdS(u=Yield the unique project names of the available distributionsN(u_distmapukeys(uselfukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iter__hs uEnvironment.__iter__cCs{t|tr|j|nXt|trdxF|D](}x||D]}|j|qFWq5Wntd|f|S(u2In-place addition of a distribution or environmentuCan't add %r to environment(u isinstanceu Distributionuaddu Environmentu TypeError(uselfuotheruprojectudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__iadd__ms uEnvironment.__iadd__cCs@|jgdddd}x||fD]}||7}q(W|S(u4Add an environment or distribution to an environmentuplatformupythonN(u __class__uNone(uselfuotherunewuenv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__add__ysuEnvironment.__add__N(u__name__u __module__u __qualname__u__doc__uNoneuget_supported_platformuPY_MAJORu__init__ucan_adduremoveuscanu __getitem__uaddu best_matchuobtainu__iter__u__iadd__u__add__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu Environments     cBs|EeZdZdZdS(uExtractionErroruTAn 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 N(u__name__u __module__u __qualname__u__doc__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuExtractionErrors cBs|EeZdZdZdZddZddZddZdd Z d d Z d d Z ddZ ddZ fddZeddZddZddZdddZdS(uResourceManageru'Manage resource extraction and packagescCs i|_dS(N(u cached_files(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__suResourceManager.__init__cCst|j|S(uDoes the named resource exist?(u get_provideru has_resource(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_existssuResourceManager.resource_existscCst|j|S(u,Is the named resource an existing directory?(u get_provideruresource_isdir(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdirs uResourceManager.resource_isdircCst|j||S(u4Return a true filesystem path for specified resource(u get_provideruget_resource_filename(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_filenames u!ResourceManager.resource_filenamecCst|j||S(u9Return a readable file-like object for specified resource(u get_provideruget_resource_stream(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_streams uResourceManager.resource_streamcCst|j||S(u%Return specified resource as a string(u get_provideruget_resource_string(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_strings uResourceManager.resource_stringcCst|j|S(u1List the contents of the named resource directory(u get_provideruresource_listdir(uselfupackage_or_requirementu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdirs u ResourceManager.resource_listdircCs]tjd}|jpt}td||f}||_||_||_|dS(u5Give an error message for problems extracting file(s)iu}Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: %s The Python egg cache directory is currently set to: %s 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(usysuexc_infouextraction_pathuget_default_cacheuExtractionErrorumanageru cache_pathuoriginal_error(uselfuold_excu cache_pathuerr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuextraction_errors   u ResourceManager.extraction_errorc Cso|jpt}tjj||d|}yt|Wn|jYnX|j|d|j|<|S(uReturn 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. u-tmpi( uextraction_pathuget_default_cacheuosupathujoinu_bypass_ensure_directoryuextraction_erroru_warn_unsafe_extraction_pathu cached_files(uselfu archive_nameunamesu extract_pathu target_path((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_cache_paths   uResourceManager.get_cache_pathcCswtjdkr*|jtjd r*dStj|j}|tj@sV|tj@rsd|}tj |t ndS(uN 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. untuwindirNu%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).( uosunameu startswithuenvironustatust_modeuS_IWOTHuS_IWGRPuwarningsuwarnu UserWarning(upathumodeumsg((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_warn_unsafe_extraction_paths &u,ResourceManager._warn_unsafe_extraction_pathcCs@tjdkr<tj|jdBd@}tj||ndS(u4Perform 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. uposiximiN(uosunameustatust_modeuchmod(uselfutempnameufilenameumode((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu postprocess suResourceManager.postprocesscCs%|jrtdn||_dS(uSet 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()``.) u5Can't change extraction path, files already extractedN(u cached_filesu ValueErroruextraction_path(uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuset_extraction_paths  u#ResourceManager.set_extraction_pathcCsdS(uB 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((uselfuforce((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucleanup_resources7su!ResourceManager.cleanup_resourcesNF(u__name__u __module__u __qualname__u__doc__uNoneuextraction_pathu__init__uresource_existsuresource_isdiruresource_filenameuresource_streamuresource_stringuresource_listdiruextraction_erroruget_cache_pathu staticmethodu_warn_unsafe_extraction_pathu postprocessuset_extraction_pathuFalseucleanup_resources(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuResourceManagers          cCsytjdSWntk r#YnXtjdkrCtjjdSd}dd|fd|fd|fdd|fg}x|D]\}}d }xn|D]5}|tjkrtjj|tj|}qPqW|rtjj||}ntjj|d SqWtd dS(u 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". uPYTHON_EGG_CACHEuntu~/.python-eggsuApplication DatauAPPDATAu USERPROFILEu HOMEDRIVEuHOMEPATHuHOMEuWINDIRuu Python-Eggsu3Please set the PYTHON_EGG_CACHE enviroment variableN(uAPPDATA((uAPPDATAN(u USERPROFILE(u HOMEDRIVEuHOMEPATH(uHOMEPATH(uHOME((uHOMEN(uWINDIR( uosuenvironuKeyErrorunameupathu expanduseruNoneujoinu RuntimeError(uapp_datau app_homesukeysusubdirudirnameukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_default_cacheDs0     cCstjdd|S(uConvert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. u[^A-Za-z0-9.]+u-(ureusub(uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu safe_namemscCs%|jdd}tjdd|S(uConvert an arbitrary string to a standard version string Spaces become dots, and all other non-alphanumeric characters become dashes, with runs of multiple dashes condensed to a single dash. u u.u[^A-Za-z0-9.]+u-(ureplaceureusub(uversion((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu safe_versionuscCstjdd|jS(uConvert 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. u[^A-Za-z0-9.]+u_(ureusubulower(uextra((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu safe_extrascCs|jddS(u|Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'. u-u_(ureplace(uname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu to_filenamescBsM|EeZdZiddd6ddd6ddd6ddd 6ejd 6ejd 6ejd 6Zed dZ e ddZ eddZ eddZ eddZeddZeddZed$ddZeddZdekr%eZned d!Zed"d#Zd$S(%uMarkerEvaluationcCstjS(N(uosuname(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusuMarkerEvaluation.uos_namecCstjS(N(usysuplatform(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusu sys_platformcCstjjdS(Ni(usysuversionusplit(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusupython_full_versioncCsdtjdtjdfS(Nu%s.%sii(usysu version_info(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusupython_versionuplatform_versionuplatform_machineupython_implementationc CsAy|j|Wn)tk r<|jtjdSYnXdS(u{ Validate text as a PEP 426 environment marker; return an exception if invalid or False otherwise. iF(uevaluate_markeru SyntaxErrorunormalize_exceptionusysuexc_infouFalse(uclsutext((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuis_invalid_markers  u"MarkerEvaluation.is_invalid_markercCsEidd6dd6}d|_d|_|j|j|j|_|S(u Given a SyntaxError from a marker evaluation, normalize the error message: - Remove indications of filename and line number. - Replace platform-specific error messages with standard error messages. uinvalid syntaxuunexpected EOF while parsinguparenthesis is never closedN(uNoneufilenameulinenougetumsg(uexcusubs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyunormalize_exceptions   u$MarkerEvaluation.normalize_exceptioncs;tjtjfddtdtdDS(Ncs#g|]}j|qS((u interpret(u.0ui(uclsunodelist(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu s u-MarkerEvaluation.and_test..ii(u functoolsureduceuoperatoruand_urangeulen(uclsunodelist((uclsunodelistu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuand_testsuMarkerEvaluation.and_testcs;tjtjfddtdtdDS(Ncs#g|]}j|qS((u interpret(u.0ui(uclsunodelist(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu s u)MarkerEvaluation.test..ii(u functoolsureduceuoperatoruor_urangeulen(uclsunodelist((uclsunodelistu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyutestsuMarkerEvaluation.testcCsd|dd}|tjkrT|ddtjkrCtdn|j|dStddS(NiiiuEmpty parenthesesu5Language feature not supported in environment markers(utokenuLPARuRPARu SyntaxErroru interpret(uclsunodelistut((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuatoms uMarkerEvaluation.atomc Cst|dkr!tdn|dd}|d}|dtjkrt|ddkr|dkrwd}qd }qny|j|}Wn(tk rtt|d YnX||j|d|j|dS( Niu5Chained comparison not allowed in environment markersiiiiunotunot inuis notu, operator not allowed in environment markers(ulenu SyntaxErrorutokenuNAMEuget_opuKeyErrorurepruevaluate(uclsunodelistucompucop((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu comparisons     uMarkerEvaluation.comparisoncCsi|jtj6|jtj6|jtj6|jtj6ddd6ddd6tjd6tjd6}ttdr|j|tj su)MarkerEvaluation.get_op..unot incSs ||kS(N((uxuy((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusuinu==u!=uor_test( utestusymboluand_testuatomu comparisonuoperatoruequneuhasattruor_test(uclsuopuops((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_ops        uMarkerEvaluation.get_opcCs#|jtj|jddS(ur Evaluate a PEP 426 environment marker on CPython 2.4+. Return a boolean indicating the marker result in this environment. Raise SyntaxError if marker is invalid. This implementation uses the 'parser' module, which is not implemented on Jython and has been superseded by the 'ast' module in Python 2.6 and later. i(u interpretuparseruexprutotuple(uclsutextuextra((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuevaluate_markers u MarkerEvaluation.evaluate_markerc Csddlm}|j}x9|jD]+}|jdd}|j|||su"NullProvider.get_resource_filenamecCst|j||S(N(uBytesIOuget_resource_string(uselfumanageru resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_streamAsu NullProvider.get_resource_streamcCs|j|j|j|S(N(u_getu_fnu module_path(uselfumanageru resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_stringDsu NullProvider.get_resource_stringcCs|j|j|j|S(N(u_hasu_fnu module_path(uselfu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu has_resourceGsuNullProvider.has_resourcecCs%|jo$|j|j|j|S(N(uegg_infou_hasu_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu has_metadataJsuNullProvider.has_metadataicCs)|js dS|j|j|j|S(Nu(uegg_infou_getu_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu get_metadataNs uNullProvider.get_metadatacCs2|js dS|j|j|j|jdS(Nuuutf-8(uegg_infou_getu_fnudecode(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu get_metadataSs cCst|j|S(N(u yield_linesu get_metadata(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_metadata_linesXsuNullProvider.get_metadata_linescCs|j|j|j|S(N(u_isdiru_fnu module_path(uselfu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_isdir[suNullProvider.resource_isdircCs%|jo$|j|j|j|S(N(uegg_infou_isdiru_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_isdir^suNullProvider.metadata_isdircCs|j|j|j|S(N(u_listdiru_fnu module_path(uselfu resource_name((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuresource_listdirasuNullProvider.resource_listdircCs)|jr%|j|j|j|SgS(N(uegg_infou_listdiru_fn(uselfuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyumetadata_listdirds uNullProvider.metadata_listdircCsd|}|j|s,td|n|j|jdd}|jdd}|j|j|}||dsuEmptyProvider.cCsdS(Nu((uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuscCsgS(N((uselfupath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuscCsdS(N((uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__suEmptyProvider.__init__N( u__name__u __module__u __qualname__u__doc__u_isdiru_hasu_getu_listdiruNoneu module_pathu__init__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu EmptyProviders   c Cst}tj|}zYxR|jD]D}|jdtj}|j|||<||dk s(t q(WWd|j X|S(uf This builds a similar dictionary to the zipimport directory caches. However instead of tuples, ZipInfo objects are stored. The translation of the tuple is as follows: * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep on pypy it is the same (one reason why distribute did work in some cases on pypy and win32). * [1] - zipinfo.compress_type * [2] - zipinfo.compress_size * [3] - zipinfo.file_size * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 len(ascii encoding of filename) otherwise * [5] - (zipinfo.date_time[0] - 1980) << 9 | zipinfo.date_time[1] << 5 | zipinfo.date_time[2] * [6] - (zipinfo.date_time[3] - 1980) << 11 | zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) * [7] - zipinfo.CRC u/N( udictuzipfileuZipFileunamelistureplaceuosusepugetinfouNoneuAssertionErroruclose(upathuzipinfouzfileuzitemuzpath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyubuild_zipmanifests  ubuild_zipmanifestcBs|EeZdZdZdZddZddZddZdd Z e d d Z d d Z ddZ ddZddZddZddZddZddZddZdS(u ZipProvideru"Resource support for zips and eggscCs?tj||t|jj|_|jjtj|_dS(N( u EggProvideru__init__ubuild_zipmanifestuloaderuarchiveuzipinfouosusepuzip_pre(uselfumodule((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__suZipProvider.__init__cCsF|j|jr)|t|jdStd||jfdS(Nu%s is not a subpath of %s(u startswithuzip_preulenuAssertionError(uselfufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _zipinfo_namesuZipProvider._zipinfo_namecCsj|j|}|j|jtjrM|t|jddjtjStd||jfdS(Niu%s is not a subpath of %s(uzip_preu startswithuegg_rootuosusepulenusplituAssertionError(uselfuzip_pathufspath((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_parts s  'uZipProvider._partscCs|jstdn|j|}|j}dj|j||kr~x*|D]}|j||j|qXWn|j||S(Nu5resource_filename() only supported for .egg, not .zipu/(uegg_nameuNotImplementedErroru_resource_to_zipu_get_eager_resourcesujoinu_partsu_extract_resourceu _eager_to_zip(uselfumanageru resource_nameuzip_pathueagersuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_resource_filenames     u!ZipProvider.get_resource_filenamecCs/|j}|jd}tj|}||fS(Niii(iii(u file_sizeu date_timeutimeumktime(uzip_statusizeu date_timeu timestamp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_date_and_size"s  uZipProvider._get_date_and_sizec Cs||jkr^x9|j|D]'}|j|tjj||}q#Wtjj|S|j|j|\}}tst dny)|j |j |j |}|j ||r|Stddtjj|\}} tj||jj|tj|t| ||f|j| |yt| |Wnmtjk rtjj|r|j ||r|Stjdkrt|t| ||SnYnXWntjk r|jYnX|S(Nu>"os.rename" and "os.unlink" are not supported on this platformu .$extractudirunt(u_indexu_extract_resourceuosupathujoinudirnameu_get_date_and_sizeuzipinfou WRITE_SUPPORTuIOErroruget_cache_pathuegg_nameu_partsu _is_currentu_mkstempuwriteuloaderuget_dataucloseuutimeu postprocessurenameuerroruisfileunameuunlinkuextraction_error( uselfumanageruzip_pathunameulastu timestampusizeu real_pathuoutfutmpnam((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_extract_resource*s@$    uZipProvider._extract_resourcec Cs|j|j|\}}tjj|s2dStj|}|j|ks_|j|krcdS|j j |}t |d}|j }|j ||kS(uK Return True if the file_path is current for this zip_path urbF(u_get_date_and_sizeuzipinfouosupathuisfileuFalseustatust_sizeust_mtimeuloaderuget_datauopenureaduclose( uselfu file_pathuzip_pathu timestampusizeustatu zip_contentsufu file_contents((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _is_current[s  uZipProvider._is_currentcCsa|jdkrZg}x6dD].}|j|r|j|j|qqW||_n|jS(Nunative_libs.txtueager_resources.txt(unative_libs.txtueager_resources.txt(ueagersuNoneu has_metadatauextenduget_metadata_lines(uselfueagersuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_eager_resourcesls  u ZipProvider._get_eager_resourcesc Csy |jSWntk ri}x|jD]y}|jtj}x^|rtjj|dd}||kr||j|dPqF|jg||=?|==|!=)\s*((\w|[-.])+)u\s*,u\s*\[u\s*\]u \w+(\.\w+)*$uL(?P[^-]+)( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?u(\d+ | [a-z]+ | \.| -)ucupreupreviewufinal-u-urcu@udevccs{xotj|D]^}t||}| s|dkr>qn|dddkre|jdVqd|VqWdVdS(Nu.iu 0123456789iu*u*final(u component_reusplitureplaceuzfill(usupart((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_parse_version_partss u_parse_version_partscCsg}xt|jD]}|jdr|dkrdx'|r`|ddkr`|jq=Wnx'|r|ddkr|jqgWn|j|qWt|S(uConvert a version string to a chronologically-sortable key This is a rough cross between distutils' StrictVersion and LooseVersion; if you give it versions that would work with StrictVersion, then it behaves the same; otherwise it acts like a slightly-smarter LooseVersion. It is *possible* to create pathological version coding schemes that will fool this parser, but they should be very rare in practice. The returned value will be a tuple of strings. Numeric portions of the version are padded to 8 digits so they will compare numerically, but without relying on how numbers compare relative to strings. Dots are dropped, but dashes are retained. Trailing zeros between alpha segments or dashes are suppressed, so that e.g. "2.4.0" is considered the same as "2.4". Alphanumeric parts are lower-cased. The algorithm assumes that strings like "-" and any alpha string that alphabetically follows "final" represents a "patch level". So, "2.4-1" is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is considered newer than "2.4-1", which in turn is newer than "2.4". Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that come before "final" alphabetically) are assumed to be pre-release versions, so that the version "2.4" is considered newer than "2.4a1". Finally, to handle miscellaneous cases, the strings "pre", "preview", and "rc" are treated as if they were "c", i.e. as though they were release candidates, and therefore are not as new as a version string that does not contain them, and "dev" is replaced with an '@' so that it sorts lower than than any other pre-release tag. u*u*finaliu*final-u00000000ii(u_parse_version_partsuloweru startswithupopuappendutuple(usupartsupart((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu parse_versions cBs|EeZdZdZffdddZddZddZddddd Z ddd d Z e dd d Z e dddZ e dddZdS(u EntryPointu3Object representing an advertised importable objectcCsnt|std|n||_||_t||_tjddj|j |_ ||_ dS(NuInvalid module nameux[%s]u,( uMODULEu ValueErrorunameu module_nameutupleuattrsu Requirementuparseujoinuextrasudist(uselfunameu module_nameuattrsuextrasudist((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__s   "uEntryPoint.__init__cCsfd|j|jf}|jr<|ddj|j7}n|jrb|ddj|j7}n|S(Nu%s = %su:u.u [%s]u,(unameu module_nameuattrsujoinuextras(uselfus((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__s   uEntryPoint.__str__cCsdt|S(NuEntryPoint.parse(%r)(ustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__#suEntryPoint.__repr__c Cs|r|j||nt|jttdg}xO|jD]D}yt||}WqDtk rtd||fYqDXqDW|S(Nu__name__u%r has no %r attribute(urequireu __import__u module_nameuglobalsuattrsugetattruAttributeErroru ImportError(uselfurequireuenvu installeruentryuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuload&s! uEntryPoint.loadcCs]|jr%|j r%td|ntttjtj|jj|j||dS(Nu&Can't require() without a distribution( uextrasudistu UnknownExtraulistumapu working_setuadduresolveurequires(uselfuenvu installer((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyurequire0s uEntryPoint.requirecCsyf}}|jdd\}}d|krz|jdd\}}tjd|}|jrntn|j}nd|kr|jdd\}}t|jstn|jjd}nWn!tk rtd|Yn#X||j|j|||SdS( uParse 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 u=iu[ux[u:u.u9EntryPoint must be in 'name=module:attrs [extras]' formatN( usplitu Requirementuparseuspecsu ValueErroruextrasuMODULEurstripustrip(uclsusrcudistuattrsuextrasunameuvalueureq((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparse6s&        uEntryPoint.parsecCst|std|ni}xZt|D]L}|j||}|j|krptd||jn|||jZ'e d?d@Z(dAS(Bu Distributionu5Wrap an actual or potential sys.path entry w/metadatauPKG-INFOcCsjt|p d|_|dk r3t||_n||_||_||_||_|p`t |_ dS(NuUnknown( u safe_nameu project_nameuNoneu safe_versionu_versionu py_versionuplatformulocationu precedenceuempty_provideru _provider(uselfulocationumetadatau project_nameuversionu py_versionuplatformu precedence((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__s     uDistribution.__init__c Ksdgd\}}}}tjj|\}} | jtkrt|} | r|| jdddd\}}}}nt| j}n|||d|d|d|d ||S( Niunameuverupyveruplatu project_nameuversionu py_versionuplatform(uNoneuosupathusplitextuloweru_distributionImpluEGG_NAMEugroup( uclsulocationubasenameumetadataukwu project_nameuversionu py_versionuplatformuextumatch((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu from_locations !uDistribution.from_locationcCs7t|df|j|jt|j|j|jfS(Nuparsed_version(ugetattru precedenceukeyu_remove_md5_fragmentulocationu py_versionuplatform(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyus  uDistribution.cCs t|jS(N(uhashuhashcmp(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__hash__suDistribution.__hash__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__lt__suDistribution.__lt__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__le__suDistribution.__le__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__gt__suDistribution.__gt__cCs|j|jkS(N(uhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__ge__suDistribution.__ge__cCs&t||jsdS|j|jkS(NF(u isinstanceu __class__uFalseuhashcmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__eq__suDistribution.__eq__cCs ||k S(N((uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__ne__suDistribution.__ne__c Cs>y |jSWn,tk r9|jj|_}|SYnXdS(N(u_keyuAttributeErroru project_nameulower(uselfukey((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyukeys   uDistribution.keyc Cs>y |jSWn,tk r9t|j|_}|SYnXdS(N(u_parsed_versionuAttributeErroru parse_versionuversion(uselfupv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparsed_versions   uDistribution.parsed_versionc Csy |jSWntk rxq|j|jD]G}|jjdr.t|jdddj|_|jSq.Wt d|j|YnXdS(Nuversion:u:iu(Missing 'Version:' header and/or %s file( u_versionuAttributeErroru _get_metadatauPKG_INFOuloweru startswithu safe_versionusplitustripu ValueError(uselfuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuversions  % uDistribution.versionc Csy |jSWntk rigd6}|_xdD]}xt|j|D]\}}|rd|kr|jdd\}}t|rg}qt|sg}qnt|pd}n|j |gj t |qRWq6W|SYnXdS(Nu requires.txtu depends.txtu:i(u requires.txtu depends.txt( u_Distribution__dep_mapuAttributeErroruNoneusplit_sectionsu _get_metadatausplituinvalid_markeruevaluate_markeru safe_extrau setdefaultuextenduparse_requirements(uselfudmunameuextraureqsumarker((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_dep_maps    "     'uDistribution._dep_mapc Cs|j}g}|j|jdfxT|D]L}y|j|t|Wq/tk rztd||fYq/Xq/W|S(u@List of Requirements needed for this distro if `extras` are usedu%s has no such extra feature %rN(u_dep_mapuextendugetuNoneu safe_extrauKeyErroru UnknownExtra(uselfuextrasudmudepsuext((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyurequiress   uDistribution.requiresccs5|j|r1x|j|D] }|VqWndS(N(u has_metadatauget_metadata_lines(uselfunameuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _get_metadatasuDistribution._get_metadatacCs~|dkrtj}n|j||tjkrzt|jx6|jdD]"}|tjkrQt|qQqQWndS(u>Ensure distribution is importable on `path` (default=sys.path)unamespace_packages.txtN( uNoneusysupathu insert_onufixup_namespace_packagesulocationu _get_metadataumodulesudeclare_namespace(uselfupathupkg((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuactivate s   uDistribution.activatecCsOdt|jt|j|jp'tf}|jrK|d|j7}n|S(u@Return what this distribution's standard .egg filename should beu %s-%s-py%su-(u to_filenameu project_nameuversionu py_versionuPY_MAJORuplatform(uselfufilename((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuegg_name s  uDistribution.egg_namecCs(|jrd||jfSt|SdS(Nu%s (%s)(ulocationustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__ s uDistribution.__repr__c CsNyt|dd}Wntk r0d}YnX|p:d}d|j|fS(Nuversionu[unknown version]u%s %s(ugetattruNoneu ValueErroru project_name(uselfuversion((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__ s   uDistribution.__str__cCs.|jdrt|nt|j|S(uADelegate all unrecognized public attributes to .metadata provideru_(u startswithuAttributeErrorugetattru _provider(uselfuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu __getattr__% suDistribution.__getattr__cKs(|jt|tjj|||S(N(u from_locationu_normalize_cacheduosupathubasename(uclsufilenameumetadataukw((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu from_filename+ suDistribution.from_filenamecCstjd|j|jfS(u?Return a ``Requirement`` that matches this distribution exactlyu%s==%s(u Requirementuparseu project_nameuversion(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuas_requirement2 suDistribution.as_requirementcCsD|j||}|dkr:td||ffn|jS(u=Return the `name` entry point of `group` or raise ImportErroruEntry point %r not foundN(uget_entry_infouNoneu ImportErroruload(uselfugroupunameuep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuload_entry_point6 s uDistribution.load_entry_pointc Csdy |j}Wn4tk rCtj|jd|}|_YnX|dk r`|j|iS|S(u=Return the entry point map for `group`, or the full entry mapuentry_points.txtN(u_ep_mapuAttributeErroru EntryPointu parse_mapu _get_metadatauNoneuget(uselfugroupuep_map((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu get_entry_map= s  ! uDistribution.get_entry_mapcCs|j|j|S(u<Return the EntryPoint object for `group`+`name`, or ``None``(u get_entry_mapuget(uselfugroupuname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuget_entry_infoI suDistribution.get_entry_infoc CsM|p |j}|sdSt|}tjj|}dd|D}xt|D]w\}}||krsPqW||krW|jtkrW|tjkr|j n|j |||j ||PqWqWW|tjkr|j n|j |dSxGy|j ||d}Wnt k r1PYqX||=||=|}qdS(u@Insert self.location in path before its nearest parent directoryNcSs(g|]}|rt|p!|qS((u_normalize_cached(u.0up((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu V s u*Distribution.insert_on..i(ulocationu_normalize_cacheduosupathudirnameu enumerateu precedenceuEGG_DISTusysucheck_version_conflictuinsertuappenduindexu ValueError( uselfupathulocunlocubdirunpathupuitemunp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu insert_onM s6       uDistribution.insert_onc Cs|jdkrdStj|jd}t|j}x|jdD]}|tjksJ||ksJ|tkr}qJn|dkrqJnt tj|dd}|rt|j |sJ|j |jrqJnt d|||jfqJWdS( Nu setuptoolsunamespace_packages.txtu top_level.txtu pkg_resourcesusiteu__file__uIModule %s was already imported from %s, but %s is being added to sys.path(u pkg_resourcesu setuptoolsusite( ukeyudictufromkeysu _get_metadataunormalize_pathulocationusysumodulesu_namespace_packagesugetattruNoneu startswithu issue_warning(uselfunspulocumodnameufn((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucheck_version_conflictt s"  u#Distribution.check_version_conflictc Cs<y |jWn*tk r7tdt|dSYnXdS(NuUnbuilt egg for FT(uversionu ValueErroru issue_warningurepruFalseuTrue(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu has_version s    uDistribution.has_versioncKsMx*dD]"}|j|t||d qW|jd|j|j|S( u@Copy this distribution, substituting in any changed keyword argsu project_nameuversionu py_versionuplatformulocationu precedenceumetadata(u project_nameuversionu py_versionuplatformulocationu precedenceN(u setdefaultugetattruNoneu _provideru __class__(uselfukwuattr((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuclone s   uDistribution.clonecCsdd|jDS(NcSsg|]}|r|qS(((u.0udep((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu s u'Distribution.extras..(u_dep_map(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuextras suDistribution.extrasN()u__name__u __module__u __qualname__u__doc__uPKG_INFOuNoneuPY_MAJORuEGG_DISTu__init__u classmethodu from_locationupropertyuhashcmpu__hash__u__lt__u__le__u__gt__u__ge__u__eq__u__ne__ukeyuparsed_versionuversionu_dep_mapurequiresu _get_metadatauactivateuegg_nameu__repr__u__str__u __getattr__u from_filenameuas_requirementuload_entry_pointu get_entry_mapuget_entry_infou insert_onucheck_version_conflictu has_versionucloneuextras(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu DistributionsL                 '   cBsk|EeZdZdZdZejdZeddZ eddZ dd Z d d Z d S( uDistInfoDistributionuGWrap an actual or potential sys.path entry w/metadata, .dist-info styleuMETADATAu([\(,])\s*(\d.*?)\s*([,\)])c Cs\y |jSWnJtk rWddlm}|j|j|j|_|jSYnXdS(uParse and cache metadatai(uParserN(u _pkg_infouAttributeErroru email.parseruParseruparsestru get_metadatauPKG_INFO(uselfuParser((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_parsed_pkg_info s   !u%DistInfoDistribution._parsed_pkg_infoc Cs:y |jSWn(tk r5|j|_|jSYnXdS(N(u_DistInfoDistribution__dep_mapuAttributeErroru_compute_dependencies(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_dep_map s   uDistInfoDistribution._dep_mapcCsy|jdddg}|dj}|dj}tj|jd|}|jddjdd}||fS(uConvert 'Foobar (1); baz' to ('Foobar ==1', 'baz') Split environment marker, add == prefix to version specifiers as necessary, and remove parenthesis. u;iuiu\1==\2\3u(u)(usplitustripureusubuEQEQureplace(uselfu requires_distupartsudistversumark((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_preparse_requirement s u*DistInfoDistribution._preparse_requirementc sddlm}igd6}|_gxc|jjdpBgD]I}|j|\}}tt|}|||_ j |qCWfdd}t |d}|dj |xR|jjdpgD]8} t | j} tt || ||| .reqs_for_extrauProvides-ExtraN(upip._vendor._markerlibucompileuNoneu_DistInfoDistribution__dep_mapu_parsed_pkg_infouget_allu_preparse_requirementunextuparse_requirementsu marker_fnuappendu frozensetuextendu safe_extraustripulist( uselfucompile_markerudmurequdistversumarkuparsedureqs_for_extraucommonuextra((ureqsu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_compute_dependencies s$u*DistInfoDistribution._compute_dependenciesN( u__name__u __module__u __qualname__u__doc__uPKG_INFOureucompileuEQEQupropertyu_parsed_pkg_infou_dep_mapu_preparse_requirementu_compute_dependencies(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuDistInfoDistribution s  uDistInfoDistributionu.eggu .egg-infou .dist-infoc Os|d}t}y-x&tj|j|kr:|d7}qWWntk rPYnXddlm}|d|d||dS(Nii(uwarnu stacklevel(uglobalsusysu _getframeu f_globalsu ValueErroruwarningsuwarn(uargsukwuleveluguwarn((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu issue_warning s  u issue_warningc#stt|fdd}xD]}t|}|sUtd|n|jd}|j}g}t||}|r|j}|tt||d d\}}}n|tt ||d d\}}}dd |D}t |||Vq+Wd S( uYield ``Requirement`` objects for each specification in `strs` `strs` must be an instance of ``basestring``, or a (possibly-nested) iterable thereof. csLg}x|||st||rayt}d}Wqatk r]tdYqaXn|||}|std|d|d||dn|j|j||j}t||}|r|j}q |||s td|d||dq q W|||}|r?|j}n|||fS(Niu+\ must not appear on the last nonblank lineu Expected u inuatuExpected ',' or end-of-list in(uCONTINUEunextu StopIterationu ValueErroruappendugroupuenduCOMMA(uITEMu TERMINATORulineupugroupsu item_nameuitemsumatch(ulines(u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu scan_list s0   * #u%parse_requirements..scan_listuMissing distribution speciu 'extra' nameiu version speccSs(g|]\}}|t|fqS((u safe_version(u.0uopuval((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu . s u&parse_requirements..N(i(ii( uiteru yield_linesuDISTROu ValueErrorugroupuenduOBRACKETuCBRACKETuVERSIONuLINE_ENDu Requirement(ustrsu scan_listulineumatchu project_nameupuextrasuspecs((ulinesu2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparse_requirements s"!    $$cCsAdd|D}|jdd|D|ddd3 s u_sort_dists..cSsg|]\}}|qS(((u.0uhcud((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu 5 s ii(usort(udistsutmp((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _sort_dists2 s u _sort_distscBsn|EeZdZddZddZddZddZd d Zd d Ze d dZ dS(u RequirementcCs|t||_}||j|_|_dd|D}|jdd|D|_|ttt ||_ |_ |jtdd|Dt |j f|_ t|j |_dS(u>DO NOT CALL THIS UNDOCUMENTED METHOD; use Requirement.parse()!cSs2g|](\}}t|t|||fqS((u parse_versionu state_machine(u.0uopuv((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu = s u(Requirement.__init__..cSs(g|]\}}}}||fqS(((u.0uparsedutransuopuver((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu ? s cSs(g|]\}}}}||fqS(((u.0uparsedutransuopuver((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu B s N(u safe_nameu unsafe_nameuloweru project_nameukeyusortuspecsutupleumapu safe_extrauindexuextrasu frozensetuhashCmpuhashu_Requirement__hash(uselfu project_nameuspecsuextrasuindex((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__init__9 s "uRequirement.__init__cCsXdjdd|jD}dj|j}|rDd|}nd|j||fS(Nu,cSsg|]}dj|qS(u(ujoin(u.0us((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu H s u'Requirement.__str__..u[%s]u%s%s%s(ujoinuspecsuextrasu project_name(uselfuspecsuextras((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__str__G s  uRequirement.__str__cCst|to|j|jkS(N(u isinstanceu RequirementuhashCmp(uselfuother((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__eq__M suRequirement.__eq__c Cst|tr=|j|jkr%dS|jr[|j}q[nt|tr[t|}nd}dd}x|jD]{\}}}}||||}|dkrdS|dkrdS|dkrd}qw|dks|dkrwd}qwqwW|dkr d}n|S( NcSs||k||kS(N((uaub((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuW su*Requirement.__contains__..uFuTu+u-FT( u isinstanceu DistributionukeyuFalseuindexuparsed_versionu basestringu parse_versionuNoneuTrue( uselfuitemulastucompareuparsedutransuopuveruaction((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu __contains__P s,        uRequirement.__contains__cCs|jS(N(u_Requirement__hash(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__hash__d suRequirement.__hash__cCsdt|S(NuRequirement.parse(%r)(ustr(uself((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu__repr__g suRequirement.__repr__cCsWtt|}|rDt|dkr2|dStd|ntd|dS(NiiuExpected only one requirementuNo requirements found(ulistuparse_requirementsulenu ValueError(usureqs((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuparsei s uRequirement.parseN( u__name__u __module__u __qualname__u__init__u__str__u__eq__u __contains__u__hash__u__repr__u staticmethoduparse(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu Requirement8 s      u--TuuT+Fu>=uT..u==uF++u!=cCs@t|ts9Gddd|t}|jddS|jS(u&Get an mro for a type or classic classcBs|EeZdZdS(u_get_mro..clsN(u__name__u __module__u __qualname__(u __locals__((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyucls suclsiN(u isinstanceutypeuobjectu__mro__(ucls((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_get_mro} su_get_mrocCsAx:tt|dt|D]}||kr||SqWdS(u2Return an adapter factory for `ob` from `registry`u __class__N(u_get_mrougetattrutype(uregistryuobut((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu _find_adapter s% u _find_adaptercCs8tjj|}tjj|s4tj|ndS(u1Ensure that the parent directory of `path` existsN(uosupathudirnameuisdirumakedirs(upathudirname((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyuensure_directory sccsd}g}xt|D]|}|jdr|jdrv|sI|rW||fVn|ddj}g}qtd|q|j|qW||fVdS(urSplit 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``. u[u]iuInvalid section headingNi(uNoneu yield_linesu startswithuendswithustripu ValueErroruappend(ususectionucontentuline((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyusplit_sections s  c OsDddlm}tj}ztt_|||SWd|t_XdS(Ni(umkstemp(utempfileumkstempuosuopenuos_open(uargsukwumkstempuold_open((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyu_mkstemp s   u_mkstempcCs@x9ttD]+}|jds tt||| s(u__doc__usysuosutimeureuimpuzipfileu zipimportuwarningsustatu functoolsupkgutilutokenusymboluoperatoruplatformu get_importeruurlparseu urlunparseu ImportErroru urllib.parseu frozensetu NameErrorusetsu ImmutableSetu basestringunextu cStringIOuStringIOuBytesIOustruiouNoneuexecfileuutimeumkdirurenameuunlinkuTrueu WRITE_SUPPORTuFalseuopenuos_openuos.pathuisdirusplitu version_infouimplementationunameuimportlib._bootstrapu _bootstrapuimportlib_bootstrapuparseru_bypass_ensure_directoryu _state_varsu_declare_stateu __getstate__u __setstate__u _sget_dictu _sset_dictu _sget_objectu _sset_objectu _sget_noneu _sset_noneuget_supported_platformu__all__u ExceptionuResolutionErroruVersionConflictuDistributionNotFoundu UnknownExtrau_provider_factoriesuversionuPY_MAJORuEGG_DISTu BINARY_DISTu SOURCE_DISTu CHECKOUT_DISTu DEVELOP_DISTuregister_loader_typeu get_provideru _macosx_versu _macosx_archuget_build_platformucompileumacosVersionStringudarwinVersionStringu get_platformucompatible_platformsu run_scripturun_mainuget_distributionuload_entry_pointu get_entry_mapuget_entry_infouIMetadataProvideruIResourceProvideruobjectu WorkingSetu EnvironmentuAvailableDistributionsu RuntimeErroruExtractionErroruResourceManageruget_default_cacheu safe_nameu safe_versionu safe_extrau to_filenameuMarkerEvaluationuis_invalid_markeruinvalid_markeruevaluate_markeru NullProvideru EggProvideruDefaultProviderutypeuSourceFileLoaderu EmptyProvideruempty_providerubuild_zipmanifestu ZipProvideru zipimporteru FileMetadatau PathMetadatau EggMetadatauregister_finderufind_distributionsufind_eggs_in_zipu find_nothingu find_on_pathu ImpImporteru FileFinderuregister_namespace_handleru _handle_nsudeclare_namespaceufixup_namespace_packagesufile_ns_handlerunull_ns_handlerunormalize_pathu_normalize_cachedu_set_parent_nsu yield_linesumatchuLINE_ENDuCONTINUEuDISTROuVERSIONuCOMMAuOBRACKETuCBRACKETuMODULEuVERBOSEu IGNORECASEuEGG_NAMEu component_reugetureplaceu_parse_version_partsu parse_versionu EntryPointu_remove_md5_fragmentu DistributionuDistInfoDistributionu_distributionImplu issue_warninguparse_requirementsu _sort_distsu Requirementu state_machineu_get_mrou _find_adapteruensure_directoryusplit_sectionsu_mkstempu_manageru _initializeuglobalsu _build_masteru working_seturequireuiter_entry_pointsu subscribeuadd_activation_listeneruentriesulistumapu add_entryupath(((u2/tmp/pip-zej_zi-build/pip/_vendor/pkg_resources.pyus                      '                               1    Y )    c    !  (           , )h !?   > :