Hacked By AnonymousFox

Current Path : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyc

�
�Rec@s,ddlZddlmZddlZddlZddlZddlZddlZyddlZWne	k
r�ddl
ZnXddlZddlm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlm Z m!Z!m"Z"ddl#m$Z$m%Z%ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/dd	l0m1Z1m2Z2dd
l3m4Z4m5Z5ej6e7�Z8ej9d�Z:ej9dej;�Z<ej9d
�Z=dZ>e?d�Z@defd��YZAdeBfd��YZCdeCfd��YZDdeCfd��YZEdeBfd��YZFdeCfd��YZGdeCfd��YZHdeCfd��YZId eCfd!��YZJd"eCfd#��YZKeKeI�eGd$d%d&�d'd(�ZLeLjMZMej9d)�ZNd*eBfd+��YZOdS(,i����N(tBytesIOi(tDistlibException(turljointurlparset
urlunparseturl2pathnametpathname2urltqueuetquotetunescapetstring_typestbuild_openertHTTPRedirectHandlert	text_typetRequestt	HTTPErrortURLError(tDistributiontDistributionPatht	make_dist(tMetadatatMetadataInvalidError(	tcached_propertytparse_credentialstensure_slashtsplit_filenametget_project_datatparse_requirementtparse_name_and_versiontServerProxytnormalize_name(t
get_schemetUnsupportedVersionError(tWheelt
is_compatibles^(\w+)=([a-f0-9]+)s;\s*charset\s*=\s*(.*)\s*$stext/html|application/x(ht)?mlshttps://pypi.org/pypicCsJ|dkrt}nt|dd�}z|j�SWd|d��XdS(s�
    Return all distribution names known by an index.
    :param url: The URL of the index.
    :return: A list of all known distribution names.
    ttimeoutg@Ntclose(tNonet
DEFAULT_INDEXRt
list_packages(turltclient((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytget_all_distribution_names)s	tRedirectHandlercBs%eZdZd�ZeZZZRS(sE
    A class to work around a bug in some Python 3.2.x releases.
    c	Cs�d}x(dD] }||kr
||}Pq
q
W|dkrAdSt|�}|jdkr�t|j�|�}t|d�r�|j||�q�|||<ntj||||||�S(Ntlocationturittreplace_header(R,R-(	R%RtschemeRtget_full_urlthasattrR/tBaseRedirectHandlerthttp_error_302(	tselftreqtfptcodetmsgtheaderstnewurltkeyturlparts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR4@s


(t__name__t
__module__t__doc__R4thttp_error_301thttp_error_303thttp_error_307(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR+7s	tLocatorcBs�eZdZdZdZdZdZed Zdd�Z	d
�Z
d�Zd�Zd�Z
d�Zee
e�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed�ZRS(!sG
    A base class for locators - things that locate distributions.
    s.tar.gzs.tar.bz2s.tars.zips.tgzs.tbzs.eggs.exes.whls.pdftdefaultcCs@i|_||_tt��|_d|_tj�|_	dS(s^
        Initialise an instance.
        :param scheme: Because locators look for most recent versions, they
                       need to know the version scheme to use. This specifies
                       the current PEP-recommended scheme - use ``'legacy'``
                       if you need to support existing distributions on PyPI.
        N(
t_cacheR0RR+topenerR%tmatcherRtQueueterrors(R5R0((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt__init__fs
			cCsmg}x`|jj�shy#|jjt�}|j|�Wn|jjk
rWq	nX|jj�q	W|S(s8
        Return any errors which have occurred.
        (RJtemptytgettFalsetappendtEmptyt	task_done(R5tresultte((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt
get_errorsyscCs|j�dS(s>
        Clear any errors which may have been logged.
        N(RT(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytclear_errors�scCs|jj�dS(N(RFtclear(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytclear_cache�scCs|jS(N(t_scheme(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_get_scheme�scCs
||_dS(N(RX(R5tvalue((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_set_scheme�scCstd��dS(s=
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This should be implemented in subclasses.

        If called from a locate() request, self.matcher will be set to a
        matcher for the requirement to satisfy, otherwise it will be None.
        s Please implement in the subclassN(tNotImplementedError(R5tname((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_get_project�s
cCstd��dS(sJ
        Return all the distribution names known to this locator.
        s Please implement in the subclassN(R\(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytget_distribution_names�scCsj|jdkr!|j|�}nE||jkr@|j|}n&|j�|j|�}||j|<|S(s�
        For a given project, get a dictionary mapping available versions to Distribution
        instances.

        This calls _get_project to do all the work, and just implements a caching layer on top.
        N(RFR%R^RU(R5R]RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytget_project�s

cCs�t|�}tj|j�}t}|jd�}|j|j�}|rftt|�|j	�}n|j
dkd|jk||||fS(su
        Give an url a score which can be used to choose preferred URLs
        for a given project release.
        s.whlthttpsspypi.org(Rt	posixpathtbasenametpathtTruetendswithtdownloadable_extensionsR"R!t
wheel_tagsR0tnetloc(R5R(ttRct
compatibletis_wheeltis_downloadable((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt	score_url�scCs{|}|rw|j|�}|j|�}||kr?|}n||kratjd||�qwtjd||�n|S(s{
        Choose one of two URLs where both are candidates for distribution
        archives for the same version of a distribution (for example,
        .tar.gz vs. zip).

        The current implementation favours https:// URLs over http://, archives
        from PyPI over those from other locations, wheel compatibility (if a
        wheel) and then the archive name.
        sNot replacing %r with %rsReplacing %r with %r(Rntloggertdebug(R5turl1turl2RRts1ts2((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt
prefer_url�s
	cCs
t||�S(sZ
        Attempt to split a filename in project name, version and Python version.
        (R(R5tfilenametproject_name((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�sc	Csd�}d}t|�\}}}}}	}
|
j�jd�rXtjd||
�ntj|
�}|r�|j�\}}
nd\}}
|}|r�|ddkr�|d }n|j	d�r�y�t
|�}t||j�s�tjd|�n�|dkrt
}n||j|�}|r�i|jd6|jd	6|jd
6t|||||	df�d6d
jg|jD]}djt|d��^qw�d6}nWq�tk
r�}tjd|�q�Xn|j	|j�s�tjd|�n�tj|�}}x�|jD]�}|j	|�r|t|� }|j||�}|sctjd|�nu|\}}}|s�|||�r�i|d6|d	6|d
6t|||||	df�d6}|r�||d<q�nPqqW|r�|r�|
|d|<n|S(s
        See if a URL is a candidate for a download URL for a project (the URL
        has typically been scraped from an HTML page).

        If it is, a dictionary is returned with keys "name", "version",
        "filename" and "url"; otherwise, None is returned.
        cSst|�t|�kS(N(R(tname1tname2((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytsame_project�ssegg=s %s: version hint in fragment: %ri����t/s.whlsWheel not compatible: %sR]tversionRvR.R(s, t.ispython-versionsinvalid path for wheel: %ssNot downloadable: %ss No match for project/version: %ss	%s_digestN(NN(R%Rtlowert
startswithRoRptHASHER_HASHtmatchtgroupsRfR!R"RhReR]R|RvRtjointpyvertlistt	ExceptiontwarningRgRbRctlenR(R5R(RwRzRRR0RiRdtparamstquerytfragtmtalgotdigesttorigpathtwheeltincludetvRSRvtextRjR]R|R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytconvert_url_to_download_info�sn		

	


=cCs�d}d|krP|d}x1dD]&}||kr#|||f}Pq#q#Wn|s�x;dD]0}d|}||kr]|||f}Pq]q]Wn|S(s�
        Get a digest from a dictionary by looking at a "digests" dictionary
        or keys of the form 'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        tdigeststsha256tmd5s	%s_digestN(R�R�(R�R�(R%(R5tinfoRRR�R�R<((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_get_digest1s



c	Cs�|jd�}|jd�}||kr@||}|j}n!t||d|j�}|j}|j|�|_}|d}||d|<|j|dkr�|j|j|�|_|dj|t	��j
|�n||_|||<dS(s�
        Update a result dictionary (the final result from _get_project) with a
        dictionary for a specific version, which typically holds information
        gleaned from a filename or URL for an archive for the distribution.
        R]R|R0R(R�turlsN(tpoptmetadataRR0R�R�t
source_urlRut
setdefaulttsettaddtlocator(	R5RRR�R]R|tdisttmdR�R(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_update_version_dataHs
	
#	cCsUd
}t|�}|d
kr1td|��nt|j�}|j|j�|_}tjd|t	|�j
�|j|j�}t
|�dkr�g}|j}	x�|D]�}
|
dkr�q�nye|j|
�s�tjd||
�n<|s|	|
�jr|j|
�ntjd|
|j�Wq�tk
rRtjd||
�q�Xq�Wt
|�d	kr�t|d
|j�}n|r�tjd|�|d}||}q�n|rH|jr�|j|_n|jdi�j|t��|_i}|jdi�}
x.|jD]#}||
kr|
|||<qqW||_nd
|_|S(s
        Find the most recent distribution which matches the given
        requirement.

        :param requirement: A requirement of the form 'foo (1.0)' or perhaps
                            'foo (>= 1.0, < 2.0, != 1.3)'
        :param prereleases: If ``True``, allow pre-release versions
                            to be located. Otherwise, pre-release versions
                            are not returned.
        :return: A :class:`Distribution` instance, or ``None`` if no such
                 distribution could be located.
        sNot a valid requirement: %rsmatcher: %s (%s)iR�R�s%s did not match %rs%skipping pre-release version %s of %sserror matching %s with %riR<ssorted list: %si����N(R�R�(R%RRRR0RHtrequirementRoRpttypeR>R`R]R�t
version_classR�t
is_prereleaseROR�R�tsortedR<textrasRMR�t
download_urlsR�(R5R�tprereleasesRRtrR0RHtversionstslisttvclstkR|tdtsdR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytlocate_sT
	
	

	$	(s.tar.gzs.tar.bz2s.tars.zips.tgzs.tbz(s.eggs.exes.whl(s.pdfN(s.whl(R>R?R@tsource_extensionstbinary_extensionstexcluded_extensionsR%RhRgRKRTRURWRYR[tpropertyR0R^R_R`RnRuRR�R�R�RNR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRDVs.
												J		tPyPIRPCLocatorcBs)eZdZd�Zd�Zd�ZRS(s�
    This locator uses XML-RPC to locate distributions. It therefore
    cannot be used with simple mirrors (that only mirror file content).
    cKs8tt|�j|�||_t|dd�|_dS(s�
        Initialise an instance.

        :param url: The URL to use for XML-RPC.
        :param kwargs: Passed to the superclass constructor.
        R#g@N(tsuperR�RKtbase_urlRR)(R5R(tkwargs((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK�s	cCst|jj��S(sJ
        Return all the distribution names known to this locator.
        (R�R)R'(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_�scCsviid6id6}|jj|t�}xF|D]>}|jj||�}|jj||�}td|j�}|d|_|d|_|j	d�|_
|j	dg�|_|j	d�|_t
|�}|r0|d	}	|	d
|_|j|	�|_||_|||<xX|D]M}	|	d
}
|j|	�}|dj|t��j|
�||d|
<qWq0q0W|S(NR�R�R0R]R|tlicensetkeywordstsummaryiR((R)tpackage_releasesRetrelease_urlstrelease_dataRR0R]R|RMR�R�R�RR�R�R�R�R�R�R�(R5R]RRR�R�R�tdataR�R�R�R(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�s0




	


 (R>R?R@RKR_R^(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR��s		tPyPIJSONLocatorcBs)eZdZd�Zd�Zd�ZRS(sw
    This locator uses PyPI's JSON interface. It's very limited in functionality
    and probably not worth using.
    cKs)tt|�j|�t|�|_dS(N(R�R�RKRR�(R5R(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK�scCstd��dS(sJ
        Return all the distribution names known to this locator.
        sNot available from this locatorN(R\(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_�scCs�iid6id6}t|jdt|��}yE|jj|�}|j�j�}tj|�}t	d|j
�}|d}|d|_|d|_|j
d�|_|j
d	g�|_|j
d
�|_t|�}||_|d}	|||j<x||dD]p}
|
d}|jj|�|j|
�|j|<|dj|jt��j|�|j|
�|d|<qWx�|dj�D]�\}}||jkr�q�nt	d|j
�}
|j|
_||
_t|
�}||_|||<xu|D]m}
|
d}|jj|�|j|
�|j|<|dj|t��j|�|j|
�|d|<q�Wq�WWn9tk
r�}|jjt|��tjd
|�nX|S(NR�R�s%s/jsonR0R�R]R|R�R�R�R(treleasessJSON fetch failed: %s( RR�RRGtopentreadtdecodetjsontloadsRR0R]R|RMR�R�R�RR�R�R�R�R�R�R�titemsR�RJtputR
Rot	exception(R5R]RRR(trespR�R�R�R�R�R�R|tinfostomdtodistRS((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�sT


	


#		


 #	(R>R?R@RKR_R^(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR��s		tPagecBszeZdZejdejejBejB�ZejdejejB�Z	d�Z
ejdej�Zed��Z
RS(s4
    This class represents a scraped HTML page.
    s�
(rel\s*=\s*(?:"(?P<rel1>[^"]*)"|'(?P<rel2>[^']*)'|(?P<rel3>[^>\s
]*))\s+)?
href\s*=\s*(?:"(?P<url1>[^"]*)"|'(?P<url2>[^']*)'|(?P<url3>[^>\s
]*))
(\s+rel\s*=\s*(?:"(?P<rel4>[^"]*)"|'(?P<rel5>[^']*)'|(?P<rel6>[^>\s
]*)))?
s!<base\s+href\s*=\s*['"]?([^'">]+)cCsM||_||_|_|jj|j�}|rI|jd�|_ndS(sk
        Initialise an instance with the Unicode page contents and the URL they
        came from.
        iN(R�R�R(t_basetsearchtgroup(R5R�R(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK s
	s[^a-z0-9$&+,/:;=?@.#%_\\|-]cCsd�}t�}x�|jj|j�D]�}|jd�}|dpv|dpv|dpv|dpv|dpv|d}|d	p�|d
p�|d}t|j|�}t|�}|jj	d�|�}|j
||f�q(Wt|d
d�dt�}|S(s�
        Return the URLs of all the links on a page together with information
        about their "rel" attribute, for determining which ones to treat as
        downloads and which ones to queue for further scraping.
        cSs@t|�\}}}}}}t||t|�|||f�S(sTidy up an URL.(RRR(R(R0RiRdR�R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytclean4sR.trel1trel2trel3trel4trel5trel6RqRrturl3cSsdt|jd��S(Ns%%%2xi(tordR�(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt<lambda>BR.R<cSs|dS(Ni((Rj((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�FR.treverse(
R�t_hreftfinditerR�t	groupdictRR�R	t	_clean_retsubR�R�Re(R5R�RRR�R�trelR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytlinks-s		(R>R?R@tretcompiletItStXR�R�RKR�RR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�s	tSimpleScrapingLocatorcBs�eZdZiejd6d�d6d�d6Zddd�Zd�Zd	�Z	d
�Z
ejdej
�Zd�Zd
�Zd�Zd�Zd�Zejd�Zd�ZRS(s�
    A locator which scrapes HTML pages to locate downloads for a distribution.
    This runs multiple threads to do the I/O; performance is at least as good
    as pip's PackageFinder, which works in an analogous fashion.
    tdeflatecCstjdtt��j�S(Ntfileobj(tgziptGzipFileRR�R�(tb((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�TR.R�cCs|S(N((R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�UR.tnonei
cKs�tt|�j|�t|�|_||_i|_t�|_t	j
�|_t�|_t
|_||_tj�|_tj�|_t
|_dS(s�
        Initialise an instance.
        :param url: The root URL to use for scraping.
        :param timeout: The timeout, in seconds, to be applied to requests.
                        This defaults to ``None`` (no timeout specified).
        :param num_workers: The number of worker threads you want to do I/O,
                            This defaults to 10.
        :param kwargs: Passed to the superclass.
        N(R�R�RKRR�R#t_page_cacheR�t_seenRRIt	_to_fetcht
_bad_hostsRNtskip_externalstnum_workerst	threadingtRLockt_lockt_gplocktplatform_check(R5R(R#R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRKXs
				cCscg|_xSt|j�D]B}tjd|j�}|jt�|j�|jj	|�qWdS(s�
        Threads are created only when get_project is called, and terminate
        before it returns. They are there primarily to parallelise I/O (i.e.
        fetching web pages).
        ttargetN(
t_threadstrangeR�R�tThreadt_fetcht	setDaemonRetstartRO(R5tiRj((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_prepare_threadsss	

cCsOx!|jD]}|jjd�q
Wx|jD]}|j�q.Wg|_dS(su
        Tell all the threads to terminate (by sending a sentinel value) and
        wait for them to do so.
        N(RR�R�R%R�(R5Rj((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt
_wait_threads�s
c	Cs�iid6id6}|j��||_||_t|jdt|��}|jj�|jj�|j	�z1t
jd|�|jj
|�|jj�Wd|j�X|`WdQX|S(NR�R�s%s/sQueueing %s(R�RRRwRR�RR�RVR�RRoRpR�R�R�R(R5R]RRR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�s
		


s<\b(linux_(i\d86|x86_64|arm\w+)|win(32|_amd64)|macosx_?\d+)\bcCs|jj|�S(sD
        Does an URL refer to a platform-specific download?
        (tplatform_dependentR�(R5R(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_is_platform_dependent�scCsy|jr!|j|�r!d}n|j||j�}tjd||�|ru|j�|j|j	|�WdQXn|S(s%
        See if an URL is a suitable download for a project.

        If it is, register information in the result dictionary (for
        _get_project) about the specific version it's for.

        Note that the return value isn't actually used other than as a boolean
        value.
        sprocess_download: %s -> %sN(
R�R
R%R�RwRoRpR�R�RR(R5R(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt_process_download�s
	
c
Cst|�\}}}}}}|j|j|j|j�rGt}n�|jrl|j|j�rlt}n�|j|j�s�t}ny|dkr�t}nd|dkr�t}nO|j	|�r�t}n7|j
dd�d}	|	j�d	kr�t}nt}t
jd
||||�|S(
s�
        Determine whether a link URL from a referring page and with a
        particular "rel" attribute should be queued for scraping.
        thomepagetdownloadthttpRatftpt:iit	localhosts#should_queue: %s (%s) from %s -> %s(RR
(RRaR(RRfR�R�R�RNR�RR�R
tsplitR~ReRoRp(
R5tlinktreferrerR�R0RiRdt_RRthost((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt
_should_queue�s*
							
cCs8x1tr3|jj�}z�y�|r�|j|�}|dkrEwnx�|jD]�\}}||jkrOy_|jj|�|j|�r�|j	|||�r�t
jd||�|jj|�nWq�t
k
r�q�XqOqOWnWn)tk
r}|jjt|��nXWd|jj�X|sPqqWdS(s�
        Get a URL to fetch from the work queue, get the HTML page, examine its
        links for download candidates and candidates for further scraping.

        This is a handy method to run in a thread.
        sQueueing %s from %sN(ReR�RMtget_pageR%R�R�R�RRRoRpR�RR�RJR
RQ(R5R(tpageRR�RS((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�s.	
cCs�t|�\}}}}}}|dkrZtjjt|��rZtt|�d�}n||jkr�|j|}tj	d||�nK|j
dd�d}d}||jkr�tj	d||�n
t
|did	d
6�}z�y7tj	d|�|jj|d|j�}	tj	d
|�|	j�}
|
jdd�}tj|�r|	j�}|	j�}
|
jd�}|r�|j|}||
�}
nd}tj|�}|r�|jd�}ny|
j|�}
Wn tk
r�|
jd�}
nXt|
|�}||j|<nWn�tk
rZ}|jdkr�tj d||�q�nkt!k
r�}tj d||�|j"�|jj#|�WdQXn&t$k
r�}tj d||�nXWd||j|<X|S(s
        Get the HTML for an URL, possibly from an in-memory cache.

        XXX TODO Note: this cache is never actually cleared. It's assumed that
        the data won't get stale over the lifetime of a locator instance (not
        necessarily true for the default_locator).
        tfiles
index.htmlsReturning %s from cache: %sRiisSkipping %s due to bad host %sR:tidentitysAccept-encodingsFetching %sR#s
Fetched %ssContent-TypeR.sContent-Encodingsutf-8slatin-1i�sFetch failed: %s: %sN(%RtosRdtisdirRRRR�RoRpRR%R�RRGR�R#R�RMtHTML_CONTENT_TYPER�tgeturlR�tdecoderstCHARSETR�R�R�tUnicodeErrorR�RR8R�RR�R�R�(R5R(R0RiRdRRRRR6R�R:tcontent_typet	final_urlR�tencodingtdecoderR�RS((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�s\	$



s<a href=[^>]*>([^<]+)<cCsqt�}|j|j�}|s7td|j��nx3|jj|j�D]}|j|jd��qMW|S(sJ
        Return all the distribution names known to this locator.
        sUnable to get %si(	R�RR�Rt_distname_reR�R�R�R�(R5RRRR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_7s	N(R>R?R@tzlibt
decompressR R%RKRRR^R�R�R�R	R
RRRRR'R_(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR�Js$


	
	
						!	;tDirectoryLocatorcBs2eZdZd�Zd�Zd�Zd�ZRS(s?
    This class locates distributions in a directory tree.
    cKso|jdt�|_tt|�j|�tjj|�}tjj	|�sbt
d|��n||_dS(s�
        Initialise an instance.
        :param path: The root of the directory tree to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * recursive - if True (the default), subdirectories are
                         recursed into. If False, only the top-level directory
                         is searched,
        t	recursivesNot a directory: %rN(R�ReR+R�R*RKRRdtabspathRRtbase_dir(R5RdR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRKHs
cCs|j|j�S(s�
        Should a filename be considered as a candidate for a distribution
        archive? As well as the filename, the directory which contains it
        is provided, though not used by the current implementation.
        (RfRg(R5Rvtparent((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytshould_includeYsc		Cs�iid6id6}x�tj|j�D]�\}}}x�|D]�}|j||�r=tjj||�}tddttjj|��dddf�}|j	||�}|r�|j
||�q�q=q=W|js'Pq'q'W|S(NR�R�RR.(RtwalkR-R/RdR�RRR,R�R�R+(	R5R]RRtroottdirstfilestfnR(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^as"
		c	Cs�t�}x�tj|j�D]�\}}}x�|D]�}|j||�r2tjj||�}tddttjj	|��dddf�}|j
|d�}|r�|j|d�q�q2q2W|j
sPqqW|S(sJ
        Return all the distribution names known to this locator.
        RR.R]N(R�RR0R-R/RdR�RRR,R�R%R�R+(R5RRR1R2R3R4R(R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_qs	"
		(R>R?R@RKR/R^R_(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR*Cs
			tJSONLocatorcBs eZdZd�Zd�ZRS(s
    This locator uses special extended metadata (not available on PyPI) and is
    the basis of performant dependency resolution in distlib. Other locators
    require archive downloads before dependencies can be determined! As you
    might imagine, that can be slow.
    cCstd��dS(sJ
        Return all the distribution names known to this locator.
        sNot available from this locatorN(R\(R5((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_�scCsBiid6id6}t|�}|r>x|jdg�D]�}|ddks9|ddkreq9nt|d|d	d
|jd
d�d|j�}|j}|d
|_d|kr�|dr�d|df|_n|jdi�|_|jdi�|_|||j	<|dj
|j	t��j|d
�q9Wn|S(NR�R�R3tptypetsdistt	pyversiontsourceR]R|R�sPlaceholder for summaryR0R(R�R�trequirementstexports(
RRMRR0R�R�R�tdependenciesR;R|R�R�R�(R5R]RRR�R�R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�s& 			

.(R>R?R@R_R^(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR5�s	tDistPathLocatorcBs eZdZd�Zd�ZRS(s�
    This locator finds installed distributions in a path. It can be useful for
    adding to an :class:`AggregatingLocator`.
    cKs8tt|�j|�t|t�s+t�||_dS(ss
        Initialise an instance.

        :param distpath: A :class:`DistributionPath` instance to search.
        N(R�R=RKt
isinstanceRtAssertionErrortdistpath(R5R@R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK�scCs�|jj|�}|dkr5iid6id6}nGi||j6it|jg�|j6d6itdg�|j6d6}|S(NR�R�(R@tget_distributionR%R|R�R�(R5R]R�RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�s
(R>R?R@RKR^(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR=�s	
tAggregatingLocatorcBsPeZdZd�Zd�Zd�Zeejj	e�Zd�Z
d�ZRS(sI
    This class allows you to chain and/or merge a list of locators.
    cOs8|jdt�|_||_tt|�j|�dS(s�
        Initialise an instance.

        :param locators: The list of locators to search.
        :param kwargs: Passed to the superclass constructor,
                       except for:
                       * merge - if False (the default), the first successful
                         search from any of the locators is returned. If True,
                         the results from all locators are merged (this can be
                         slow).
        tmergeN(R�RNRCtlocatorsR�RBRK(R5RDR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK�s	cCs5tt|�j�x|jD]}|j�qWdS(N(R�RBRWRD(R5R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRW�scCs*||_x|jD]}||_qWdS(N(RXRDR0(R5RZR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR[�s	cCs]i}xP|jD]E}|j|�}|r|jr�|jdi�}|jdi�}|j|�|jd�}|r�|r�xF|j�D]5\}}	||kr�||c|	O<q�|	||<q�Wn|jd�}
|rR|
rR|
j|�qRqU|jdkrt}n3t	}x*|D]"}|jj
|�rt}PqqW|rU|}PqUqqW|S(NR�R�(RDR`RCRMtupdateR�RHR%ReRNR�(R5R]RRR�R�R3R�tdfR�R�tddtfound((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR^�s8	
	
cCsIt�}x9|jD].}y||j�O}Wqtk
r@qXqW|S(sJ
        Return all the distribution names known to this locator.
        (R�RDR_R\(R5RRR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyR_s	
(R>R?R@RKRWR[R�RDR0tfgetR^R_(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRB�s				,shttps://pypi.org/simple/R#g@R0tlegacys1(?P<name>[\w-]+)\s*\(\s*(==\s*)?(?P<ver>[^)]+)\)$tDependencyFindercBsVeZdZdd�Zd�Zd�Zd�Zd�Zd�Z	de
d�ZRS(	s0
    Locate dependencies for distributions.
    cCs(|p	t|_t|jj�|_dS(sf
        Initialise an instance, using the specified locator
        to locate distributions.
        N(tdefault_locatorR�RR0(R5R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK1scCs�tjd|�|j}||j|<||j||jf<x^|jD]S}t|�\}}tjd|||�|jj	|t
��j||f�qFWdS(s�
        Add a distribution to the finder. This will update internal information
        about who provides what.
        :param dist: The distribution to add.
        sadding distribution %ssAdd to provided: %s, %s, %sN(RoRpR<t
dists_by_nametdistsR|tprovidesRtprovidedR�R�R�(R5R�R]tpR|((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytadd_distribution9s	
cCs�tjd|�|j}|j|=|j||jf=xl|jD]a}t|�\}}tjd|||�|j|}|j	||f�|s@|j|=q@q@WdS(s�
        Remove a distribution from the finder. This will update internal
        information about who provides what.
        :param dist: The distribution to remove.
        sremoving distribution %ss Remove from provided: %s, %s, %sN(
RoRpR<RMRNR|RORRPtremove(R5R�R]RQR|ts((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytremove_distributionHs	

cCsPy|jj|�}Wn3tk
rK|j�d}|jj|�}nX|S(s�
        Get a version matcher for a requirement.
        :param reqt: The requirement
        :type reqt: str
        :return: A version matcher (an instance of
                 :class:`distlib.version.Matcher`).
        i(R0RHR R(R5treqtRHR]((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytget_matcherZs
c	Cs�|j|�}|j}t�}|j}||kr�x_||D]P\}}y|j|�}Wntk
ryt}nX|rA|j|�PqAqAWn|S(s�
        Find the distributions which can fulfill a requirement.

        :param reqt: The requirement.
         :type reqt: str
        :return: A set of distribution which can fulfill the requirement.
        (RWR<R�RPR�R RNR�(	R5RVRHR]RRRPR|tproviderR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytfind_providersjs			


c	Cs�|j|}t�}x?|D]7}|j|�}|j|j�s|j|�qqW|r�|jd||t|�f�t}nZ|j|�|j|=x-|D]%}|jj	|t��j|�q�W|j
|�t}|S(s�
        Attempt to replace one provider with another. This is typically used
        when resolving dependencies from multiple sources, e.g. A requires
        (B >= 1.0) while C requires (B >= 1.1).

        For successful replacement, ``provider`` must meet all the requirements
        which ``other`` fulfills.

        :param provider: The provider we are trying to replace with.
        :param other: The provider we're trying to replace.
        :param problems: If False is returned, this will contain what
                         problems prevented replacement. This is currently
                         a tuple of the literal string 'cantreplace',
                         ``provider``, ``other``  and the set of requirements
                         that ``provider`` couldn't fulfill.
        :return: True if we can replace ``other`` with ``provider``, else
                 False.
        tcantreplace(treqtsR�RWR�R|R�t	frozensetRNRUR�RRRe(	R5RXtothertproblemstrlistt	unmatchedRTRHRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyttry_to_replace�s"
	
	


#
cCs!i|_i|_i|_i|_t|p0g�}d|krk|jd�|tdddg�O}nt|t�r�|}}tj	d|�nK|j
j|d|�}}|dkr�t
d|��ntj	d|�t|_t�}t|g�}t|g�}x�|r�|j�}|j}	|	|jkrO|j|�n/|j|	}
|
|kr~|j||
|�n|j|jB}|j}t�}
|r�||kr�xAdD]6}d|}||kr�|
t|d
|�O}
q�q�Wn||B|
B}x�|D]�}|j|�}|s1tj	d|�|j
j|d|�}|dkr||r||j
j|dt�}n|dkr�tj	d|�|jd|f�q1|j|j}}||f|jkr�|j|�n|j|�||kr1||kr1|j|�tj	d|j�q1nxw|D]o}|j}	|	|jkrx|jj|t��j|�q8|j|	}
|
|kr8|j||
|�q8q8WqWqWt|jj��}x<|D]4}||k|_|jr�tj	d|j�q�q�Wtj	d|�||fS(s�
        Find a distribution and all distributions it depends on.

        :param requirement: The requirement specifying the distribution to
                            find, or a Distribution instance.
        :param meta_extras: A list of meta extras such as :test:, :build: and
                            so on.
        :param prereleases: If ``True``, allow pre-release versions to be
                            returned - otherwise, don't return prereleases
                            unless they're all that's available.

        Return a set of :class:`Distribution` instances and a set of
        problems.

        The distributions returned should be such that they have the
        :attr:`required` attribute set to ``True`` if they were
        from the ``requirement`` passed to ``find()``, and they have the
        :attr:`build_time_dependency` attribute set to ``True`` unless they
        are post-installation dependencies of the ``requirement``.

        The problems should be a tuple consisting of the string
        ``'unsatisfied'`` and the requirement which couldn't be satisfied
        by any distribution known to the locator.
        s:*:s:test:s:build:s:dev:spassed %s as requirementR�sUnable to locate %rs
located %sttesttbuildtdevs:%s:s%s_requiressNo providers found for %rsCannot satisfy %rtunsatisfiedsAdding %s to install_distss#%s is a build-time dependency only.sfind done for %sN(RbRcRd(RPRNRMR[R�RSR>RRoRpR�R�R%RRet	requestedR�R<RRRatrun_requirest
meta_requirestbuild_requirestgetattrRYR�R|tname_and_versionR�tvaluestbuild_time_dependency(R5R�tmeta_extrasR�R�R�R^ttodot
install_distsR]R]tireqtstsreqtstereqtsR<RSt	all_reqtsR�t	providersRXtnR�RQRN((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pytfind�s�				


				
		

!


	
	"
"
		N(R>R?R@R%RKRRRURWRYRaRNRw(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyRK,s					((PR�tioRR�tloggingRRbR�R�tImportErrortdummy_threadingR(R.RtcompatRRRRRRRR	R
RRR3R
RRRtdatabaseRRRR�RRtutilRRRRRRRRRR|RR R�R!R"t	getLoggerR>RoR�R�R�R!RR&R%R*R+tobjectRDR�R�R�R�R*R5R=RBRLR�tNAME_VERSION_RERK(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyt<module>sV
d@�F0E:�A&[				

Hacked By AnonymousFox1.0, Coded By AnonymousFox