ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/__pycache__/index.cpython-33.pyc

�
�2{Yӝc@s�dZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
mZmZddl
mZmZmZmZmZddlmZmZddlmZmZmZddlmZmZdd	lmZmZm Z dd
l!m"Z"m#Z#m$Z$ddl%m&Z&dgZ'd
Z(idgd6Z)Gdd�de*�Z+Gdd�de*�Z,Gdd�de*�Z-Gdd�de*�Z.e.e	�Z/dd�Z0dd�Z1dS(u!Routines related to PyPI, indexesiN(ulogger(uInfunormalize_nameusplitextu
is_prerelease(uDistributionNotFounduBestVersionAlreadyInstalleduInstallationErroruInvalidWheelFilenameuUnsupportedWheel(uurlparseuurl2pathname(u
PipSessionuurl_to_pathupath_to_url(uWheelu	wheel_ext(usupported_tagsusupported_tags_noarchuget_platform(uhtml5liburequestsu
pkg_resources(uSSLErroru
PackageFinderulast.pypi.python.orguhttpsuhttpc	Bs
|EeZdZdZd"ggd#d#d#d!dd�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zejd�Zejdej�Zejd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!S($u
PackageFinderu�This finds packages.

    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links
    c

Cs�||_||_g|_t�|_t�|_||_tdd�|D��|_tdd�|D��|_	|j|j	O_||_
d|_d|_
||_||_d|_|	p�t�|_dS(Ncss|]}t|�VqdS(N(unormalize_name(u.0un((u"/tmp/pip-bsqfwp-build/pip/index.pyu	<genexpr>4su)PackageFinder.__init__.<locals>.<genexpr>css|]}t|�VqdS(N(unormalize_name(u.0un((u"/tmp/pip-bsqfwp-build/pip/index.pyu	<genexpr>8sF(u
find_linksu
index_urlsudependency_linksu	PageCacheucacheusetulogged_linksu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluFalseuneed_warn_externaluneed_warn_unverifieduallow_all_prereleasesuprocess_dependency_linksu_have_warned_dependency_linksu
PipSessionusession(
uselfu
find_linksu
index_urlsu	use_wheeluallow_externaluallow_unverifieduallow_all_externaluallow_all_prereleasesuprocess_dependency_linksusession((u"/tmp/pip-bsqfwp-build/pip/index.pyu__init__&s"										uPackageFinder.__init__cCsE|jrA|js.tjdd�d|_n|jj|�ndS(Nu1.6upDependency Links processing has been deprecated with an accelerated time schedule and will be removed in pip 1.6T(uprocess_dependency_linksu_have_warned_dependency_linksuloggeru
deprecateduTrueudependency_linksuextend(uselfulinks((u"/tmp/pip-bsqfwp-build/pip/index.pyuadd_dependency_linksSs		u"PackageFinder.add_dependency_linksc	sJg�g���fdd�}x|D]}tjj|�}|jd�}||jk}|sj|r/|ry|}nt|�}|r�tjj|�r�tjj|�}xztj|�D]}|tjj	||��q�Wq<|r
tjj|�r
�j
|�q<tjj|�r<||�q<q(�j
|�q(W��fS(ut
        Sort locations into "files" (archives) and "urls", and return
        a pair of lists (files,urls)
        csLt|�}tj|dd�ddkr;�j|�n
�j|�dS(Nustrictiu	text/htmlF(upath_to_urlu	mimetypesu
guess_typeuFalseuappend(upathuurl(ufilesuurls(u"/tmp/pip-bsqfwp-build/pip/index.pyu	sort_pathksu0PackageFinder._sort_locations.<locals>.sort_pathufile:(uosupathuexistsu
startswithu
find_linksuurl_to_pathuisdirurealpathulistdirujoinuappenduisfile(	uselfu	locationsu	sort_pathuurlu
is_local_pathuis_file_urluis_find_linkupathuitem((ufilesuurlsu"/tmp/pip-bsqfwp-build/pip/index.pyu_sort_locationsbs*
	 uPackageFinder._sort_locationscCs�|\}}}|jr�tt�}|tkr9d}nW|jtkr�t|j�}|j�syt	d|j��n|j
�}n|}||fS|SdS(uL
        Function used to generate link sort key for link tuples.
        The greater the return value, the more preferred it is.
        If not finding wheels, then sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min()
          3. source archives
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        iuB%s is not a supported wheel for this platform. It can't be sorted.N(u	use_wheelulenusupported_tagsuINSTALLED_VERSIONuextu	wheel_extuWheelufilenameu	supporteduUnsupportedWheelusupport_index_min(uselfu
link_tupleuparsed_versionulinku_usupport_numupriuwheel((u"/tmp/pip-bsqfwp-build/pip/index.pyu_link_sort_key�s
		
uPackageFinder._link_sort_keycCst|d|jdd�S(u�
        Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
        See the docstring for `_link_sort_key` for details.
        This function is isolated for easier unit testing.
        ukeyureverseT(usortedu_link_sort_keyuTrue(uselfuapplicable_versions((u"/tmp/pip-bsqfwp-build/pip/index.pyu_sort_versions�suPackageFinder._sort_versionscs�fdd��|j�d}|jr�t�|jd�dd2�}|j||�}|dkr�|jt|jddd2��|�p�|j�q�n�dk	r��fdd�|jD�|j}nt|j�}xH|j	D]=}�dk	r�|dk	r�t
j|j|�g|}q�q�W|j
|�\}}|j
|j�\}	}
|j|	�dd�|D�}|jdd�|
D��tjd	|�x�|D]�}tjd
|�tjt|��}|jtkr�t|j}
t|
�dkr3||j|
d|jf}tjd|�q�t|
�dkrz||jd
j|
�|jf}tjd|�q�||jf}tjd|�q�q�Wg}|j|jdd�|jD�|jj���g}xy|j||�D]e}tjd|j�tjd7_z)|j|j|j|jj���Wdtjd8_Xq�Wt|jdd�|jD�|jj���}|r�tjdd
jdd�|D���nt|jdd�|D�|jj���}|rj|rj|rj|rjtj d|�|j!r7tjd|j�n|j"rWtjd|j�nt#d|��ng}|j$dk	r�|j$j%t&|j$j'fg}n|r�|j(dd2�tjdd
jdd�|D���n|||||}g}x�|D]�\}}}||j)kr]tjd||djd d�|j)j*D��f�qnKt+|�r�|j,px|j-r�|t&k	r�tjd!||f�qq�n|j.|||f�qW|j/|�}t0d"d�|D��}|rN|rN|ddt&kr%tjd#|j$j'�n%tjd$|j$j'|ddf�dS|s�tj d%|d
jd&d�|D��f�|j!r�tjd'�n|j"r�tjd|j�nt#d(|��n|ddt&kr-tjd)|j$j'd
jd*d�|dd�D��pd+f�t1�nt|�dkrwtjd,|ddd
jd-d�|D��f�n|dd}|j2dk	r�|j2r�tjd.|j�n|j3dk	r�|j3r�tjd/|j�n|j4rtj5d0d1|j�n|S(3Ncs2tj|��}|jd�s.|d}n|S(Nu/(u	posixpathujoinuendswith(uurluloc(uurl_name(u"/tmp/pip-bsqfwp-build/pip/index.pyumkurl_pypi_url�s
u6PackageFinder.find_requirement.<locals>.mkurl_pypi_urliutrustedcsg|]}�|��qS(((u.0uurl(umkurl_pypi_url(u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>�s	u2PackageFinder.find_requirement.<locals>.<listcomp>cSs"g|]}t|dd��qS(utrustedT(uLinkuTrue(u.0uurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>�s	cSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>�s	u#URLs to search for versions for %s:u* %siuS%s uses an insecure transport scheme (%s). Consider using %s if %s has it availableu, uc%s uses an insecure transport scheme (%s). Consider using one of %s if %s has any of them availableu*%s uses an insecure transport scheme (%s).cSs%g|]}t|ddd��qS(u-futrustedT(uLinkuTrue(u.0uurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>�s	uAnalyzing links from page %sicSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>s	udependency_links found: %scSs"g|]\}}}|j�qS((uurl(u.0uparsedulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>s	cSsg|]}t|��qS((uLink(u.0uurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>s	u<Could not find any downloads that satisfy the requirement %suMSome externally hosted files were ignored (use --allow-external %s to allow).uWSome insecure and unverifiable files were ignored (use --allow-unverified %s to allow).u$No distributions at all found for %sureverseuLocal files found: %scSs(g|]\}}}t|j��qS((uurl_to_pathuurl(u.0uparsedulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>s	u-Ignoring link %s, version %s doesn't match %su,cSsg|]}dj|��qS(u(ujoin(u.0us((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>"s	uCIgnoring link %s, version %s is a pre-release (use --pre to allow).cSs+g|]!\}}}|tkr|�qS((uINSTALLED_VERSION(u.0uparsed_versionulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>,s	uLExisting installed version (%s) is most up-to-date and satisfies requirementuUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)uNCould not find a version that satisfies the requirement %s (from versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>7s	uJSome externally hosted files were ignored (use --allow-external to allow).u,No distributions matching the version for %su=Installed version (%s) is most up-to-date (past versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>Fs	unoneu)Using version %s (newest of versions: %s)cSsg|]\}}}|�qS(((u.0uparsed_versionulinkuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>Js	u2%s an externally hosted file and may be unreliableu,%s is potentially insecure and unverifiable.u1.7ua%s discovered using a deprecated method of parsing, in the future it will no longer be discoveredT(6uurl_nameuNoneu
index_urlsuLinkuTrueu	_get_pageu_find_url_nameu
find_linksulistuabsolute_versionsu	posixpathujoinuurlu_sort_locationsudependency_linksuextenduloggerudebuguurlparseustruschemeuINSECURE_SCHEMESulenunetlocuwarnu_package_versionsunameuloweru
_get_pagesuindentulinksuinfoufataluneed_warn_externaluneed_warn_unverifieduDistributionNotFoundusatisfied_byuparsed_versionuINSTALLED_VERSIONuversionusorturequspecsu
is_prereleaseuallow_all_prereleasesuprereleasesuappendu_sort_versionsubooluBestVersionAlreadyInstalleduinternalu
verifiableu_deprecated_regexu
deprecated(uselfurequupgradeumain_index_urlupageu	locationsuversionufile_locationsu
url_locationsu_flocationsu_ulocationsulocationuparsedusecure_schemesuctxufound_versionsu
page_versionsudependency_versionsu
file_versionsuinstalled_versionuall_versionsuapplicable_versionsuparsed_versionulinkuexisting_applicableuselected_version((umkurl_pypi_urluurl_nameu"/tmp/pip-bsqfwp-build/pip/index.pyufind_requirement�s�
		7#


			&)	(*	%				!*	-	
			$				:		/
	
		uPackageFinder.find_requirementcCs�|jjd�s$|jd7_n|j||�}|dkrWtjd|�dSt|j�}xY|jD]N}t	j
|jjd��}|t|�krptj
d||f�|SqpWdS(u�Finds the true URL name of a package, when the given name isn't quite correct.
        This is usually used to implement case-insensitivity.u/uCannot fetch index base URL %sNu!Real name of requirement %s is %s(uurluendswithu	_get_pageuNoneuloggerufatalunormalize_nameuurl_nameulinksu	posixpathubasenameupathurstripunotify(uselfu	index_urluurl_nameurequpageu	norm_nameulinkubase((u"/tmp/pip-bsqfwp-build/pip/index.pyu_find_url_namebsuPackageFinder._find_url_namec	cs7t|�}t�}x|r2|jd�}||kr?qn|j|�|j||�}|dkrpqn|Vx�|j�D]�}t|j�j	�}||j
kr�|jr�d|_
tjd|�q�n|jdk	r|jr||jkrtjd|�d|_q�n|j|�q�WqWdS(u�
        Yields (page, page_url) from the given locations, skipping
        locations that have errors, and adding download/homepage links
        iu@Not searching %s for files because external urls are disallowed.u_Not searching %s for urls, it is an untrusted link and cannot produce safe or verifiable files.NT(ulistusetupopuaddu	_get_pageuNoneu	rel_linksunormalize_nameunameuloweruallow_externaluallow_all_externaluTrueuneed_warn_externaluloggerudebugutrusteduallow_unverifieduneed_warn_unverifieduappend(	uselfu	locationsurequ
all_locationsuseenulocationupageulinku
normalized((u"/tmp/pip-bsqfwp-build/pip/index.pyu
_get_pagesus6		

		
		uPackageFinder._get_pagesu#egg=([^&]*)u([a-z0-9_.]+)-([a-z0-9_.-]+)u-py([123]\.?[0-9]?)$cCsqgg}}t�}xP|D]H}||kr|j|�|jrU|j|�qe|j|�qqW||S(ugReturns elements of links in order, non-egg links first, egg links second, while eliminating duplicates(usetuadduegg_fragmentuappend(uselfulinksueggsuno_eggsuseenulink((u"/tmp/pip-bsqfwp-build/pip/index.pyu_sort_links�s
	

	uPackageFinder._sort_linksccs@x9|j|�D](}x|j||�D]}|Vq)WqWdS(N(u_sort_linksu_link_package_versions(uselfulinksusearch_nameulinkuv((u"/tmp/pip-bsqfwp-build/pip/index.pyu_package_versions�suPackageFinder._package_versionscCsd}|jr|tfS|S(Nu.tar.gzu.tar.bz2u.taru.tgzu.zip(u.tar.gzu.tar.bz2u.taru.tgzu.zip(u	use_wheelu	wheel_ext(uselfu
extensions((u"/tmp/pip-bsqfwp-build/pip/index.pyu_known_extensions�s	uPackageFinder._known_extensionscCst�}d}|jr$|j}nN|j�\}}|ss||jkrotjd|�|jj|�ngS|jd�r�|dd�}d|}n||j	�kr�||jkr�tjd||f�|jj|�ngSd|j
kr@|dkr@||jkr<tjd|�|jj|�ngS|tkrryt|j
�}Wn'tk
r�tjd	|�gSYnX|jj�|j�kr�tjd
||f�gS|j�s�tjd|�gSt|dd�}|jd
�rf|jd�rf|dk	rftj|j�jjd�rf|jdt�sftjd|�gSn|j}n|s�|j|||�}n|dkr�tjd
||f�gS|jdk	r|jrt|�j�|jkr|jrtjd|�d|_gS|j dk	re|j ret|�j�|j!kretjd|�d|_"gS|j#j$|�}	|	r�|d|	j%��}|	j&d�}
|
t'jdd�kr�tjd|�gSntjd||f�t(j)|�||fgS(u�
        Return an iterable of triples (pkg_resources_version_key,
        link, python_version) that can be extracted from the given
        link.

        Meant to be overridden by subclasses, not called by clients.
        uSkipping link %s; not a fileu.tarNiu,Skipping link %s; unknown archive format: %sumacosx10u.zipuSkipping link %s; macosx10 oneu1Skipping %s because the wheel filename is invalidu-Skipping link %s; wrong project name (not %s)u9Skipping %s because it is not compatible with this Pythonu
comes_fromuwinumacosxupypi.python.orgutagsuOSkipping %s because it is a pypi-hosted binary Wheel on an unsupported platformu,Skipping %s because it is externally hosted.u<Skipping %s because it is an insecure and unverifiable file.iiu/Skipping %s because Python version is incorrectuFound link %s, version: %si����T(*uget_platformuNoneuegg_fragmentusplitextulogged_linksuloggerudebuguadduendswithu_known_extensionsupathu	wheel_extuWheelufilenameuInvalidWheelFilenameunameuloweru	supportedugetattru
startswithuurlparseuurlunetlocusupported_tags_noarchuversionu_egg_info_matchesuinternalunormalize_nameuallow_externaluallow_all_externaluTrueuneed_warn_externalu
verifiableuallow_unverifieduneed_warn_unverifiedu_py_version_reusearchustartugroupusysu
pkg_resourcesu
parse_version(uselfulinkusearch_nameuplatformuversionuegg_infouextuwheelu
comes_fromumatchu
py_version((u"/tmp/pip-bsqfwp-build/pip/index.pyu_link_package_versions�s�		

		

	
		u$PackageFinder._link_package_versionscCs�|jj|�}|s-tjd|�dS|jd�j�}|jdd�}|j�d}|j|�r�|jd�t	|�d�SdSdS(Nu%Could not parse version from link: %siu_u-(
u_egg_info_reusearchuloggerudebuguNoneugroupulowerureplaceu
startswithulen(uselfuegg_infousearch_nameulinkumatchunameulook_for((u"/tmp/pip-bsqfwp-build/pip/index.pyu_egg_info_matches&suPackageFinder._egg_info_matchescCs"tj||d|jd|j�S(Nucacheusession(uHTMLPageuget_pageucacheusession(uselfulinkureq((u"/tmp/pip-bsqfwp-build/pip/index.pyu	_get_page5s	uPackageFinder._get_pageNTF(u__name__u
__module__u__qualname__u__doc__uTrueuFalseuNoneu__init__uadd_dependency_linksu_sort_locationsu_link_sort_keyu_sort_versionsufind_requirementu_find_url_nameu
_get_pagesureucompileu_egg_fragment_reuIu_egg_info_reu_py_version_reu_sort_linksu_package_versionsu_known_extensionsu_link_package_versionsu_egg_info_matchesu	_get_page(u
__locals__((u"/tmp/pip-bsqfwp-build/pip/index.pyu
PackageFinders(	*(�)
lcBsw|EeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zddd�Z
d
d�Zdd�ZdS(u	PageCacheuCache of HTML pagesicCsi|_i|_i|_dS(N(u	_failuresu_pagesu	_archives(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyu__init__As		uPageCache.__init__cCs|jj|d�|jkS(Ni(u	_failuresugetu
failure_limit(uselfuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyutoo_many_failuresFsuPageCache.too_many_failurescCs|jj|�S(N(u_pagesuget(uselfuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyuget_pageIsuPageCache.get_pagecCs|jj|d�S(NF(u	_archivesugetuFalse(uselfuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
is_archiveLsuPageCache.is_archivecCs||j|<dS(N(u	_archives(uselfuurluvalue((u"/tmp/pip-bsqfwp-build/pip/index.pyuset_is_archiveOsuPageCache.set_is_archivecCs$|jj|d�||j|<dS(Ni(u	_failuresuget(uselfuurlulevel((u"/tmp/pip-bsqfwp-build/pip/index.pyuadd_page_failureRsuPageCache.add_page_failurecCs"x|D]}||j|<qWdS(N(u_pages(uselfuurlsupageuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyuadd_pageUs
uPageCache.add_pageNT(
u__name__u
__module__u__qualname__u__doc__u
failure_limitu__init__utoo_many_failuresuget_pageu
is_archiveuTrueuset_is_archiveuadd_page_failureuadd_page(u
__locals__((u"/tmp/pip-bsqfwp-build/pip/index.pyu	PageCache<su	PageCachecBsG|EeZdZdZejdej�Zejdej�Zejdejej	B�Z
d!d!dd�Zdd�Z
ed!d"d!d	d
��Zed!dd!dd
��Zed!dd��Zedd��Zedd��Zedd��Zdd�Zd#dd�Zdd�Zejdej�Zdd �Zd!S($uHTMLPageu'Represents one page, along with its URLu<th>\s*home\s*pageu<th>\s*download\s+urlu(href=(?:"([^"]*)"|'([^']*)'|([^>\s\n]*))cCsC||_tj|jdd�|_||_||_||_dS(NunamespaceHTMLElementsF(ucontentuhtml5libuparseuFalseuparseduurluheadersutrusted(uselfucontentuurluheadersutrusted((u"/tmp/pip-bsqfwp-build/pip/index.pyu__init__bs
			uHTMLPage.__init__cCs|jS(N(uurl(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyu__str__isuHTMLPage.__str__cCs\|dkrt�}n|j}|jdd�d}|j|�rJdSddlm}xT|jD]I}|j�j	|�rd|t
|�dkrdtjdt
��dSqdW|dk	r�|j|�}	|	dk	r�|	Sny|r�|dk	r
|j|�r
dSn|j}
x�ddd	d
dgD]}}|
j|�r)|j|d|�}|j�j	d
�rlPq�tjd||f�|dk	r�|j|�ndSq)q)Wntjd|�tj|�\}}
}}}}|dkrEtjjt|��rE|jd�s|d7}ntj|d�}tjd|�n|j|did
d6�}|j�|jjdd�}|j�j	d
�s�tjd||f�|dk	r�|j|�ndS||j|j|jd|j�}	Wn8tj k
r[}zE|j!j"dkr!dnd}|j#||||d|d|�WYdd}~Xn�tj$k
r�}z%|j#||d||d|�WYdd}~Xn�tj%k
r�|j#||d|d|�Yn�t&k
r+}z:d|}|j#||||d|ddd tj'�WYdd}~Xn-X|dk	rT|j(||jg|	�n|	SdS(!Nu#ii(u
VcsSupportu+:u&Cannot look at %(scheme)s URL %(link)su.taru.tar.gzu.tar.bz2u.tgzu.zipusessionu	text/htmlu,Skipping page %s because of Content-Type: %suGetting page %sufileu/u
index.htmlu# file: URL is directory, getting %suheadersuAcceptuContent-Typeuunknownutrustedi�iucacheuleveluconnection error: %su	timed outu6There was a problem confirming the ssl certificate: %sumeth()uNoneu
PipSessionuurlusplitutoo_many_failuresupip.vcsu
VcsSupportuschemesuloweru
startswithulenuloggerudebugulocalsuget_pageu
is_archiveufilenameuendswithu_get_content_typeuset_is_archiveuurlparseuosupathuisdiruurl2pathnameuurljoinugeturaise_for_statusuheadersutextutrustedurequestsu	HTTPErroruresponseustatus_codeu_handle_failuConnectionErroruTimeoutuSSLErrorunotifyuadd_page(uclsulinkurequcacheu
skip_archivesusessionuurlu
VcsSupportuschemeuinstufilenameubad_extucontent_typeunetlocupathuparamsuqueryufragmenturespuexculevelureason((u"/tmp/pip-bsqfwp-build/pip/index.pyuget_pagels�	+		!$

		(4 uHTMLPage.get_pageicCsb|dkrtj}n|d||�|d|j|f�|dk	r^|j||�ndS(NuCould not fetch URL %s: %su7Will skip URL %s when looking for download links for %s(uNoneuloggeruinfouurluadd_page_failure(urequlinkureasonuurlucacheulevelumeth((u"/tmp/pip-bsqfwp-build/pip/index.pyu_handle_fail�suHTMLPage._handle_failcCsx|dkrt�}ntj|�\}}}}}|d	krFdS|j|dd
�}|j�|jjdd�S(u;Get the Content-Type of the given url, using a HEAD requestuhttpuhttpsuftpuftpsuuallow_redirectsuContent-TypeN(uhttpuhttpsuftpuftpsT(	uNoneu
PipSessionuurlparseuurlsplituheaduTrueuraise_for_statusuheadersuget(uurlusessionuschemeunetlocupathuqueryufragmenturesp((u"/tmp/pip-bsqfwp-build/pip/index.pyu_get_content_type�s
uHTMLPage._get_content_typecCs�t|d�s�d}dd�|jjd�D�}|r~y t|djdd��}Wq~ttfk
rzd}Yq~Xn||_n|jS(Nu_api_versioncSs4g|]*}|jdd�j�dkr|�qS(unameuuapi-version(ugetulower(u.0ux((u"/tmp/pip-bsqfwp-build/pip/index.pyu
<listcomp>�s	u(HTMLPage.api_version.<locals>.<listcomp>u.//metaiuvalue(	uhasattruNoneuparsedufindalluintugetu	TypeErroru
ValueErroru_api_version(uselfu_api_versionumetas((u"/tmp/pip-bsqfwp-build/pip/index.pyuapi_version�s uHTMLPage.api_versioncCsgt|d�s`|jjd�}|dk	rQ|jd�rQ|jd�|_q`|j|_n|jS(Nu	_base_urlu.//baseuhref(uhasattruparsedufinduNoneugetu	_base_urluurl(uselfubase((u"/tmp/pip-bsqfwp-build/pip/index.pyubase_url�suHTMLPage.base_urlccs�x�|jjd�D]�}|jd�r|jd�}|jtj|j|��}d}|jr�|jdkr�t	|jd�o�d|jd�j
�k�}nt||d|�VqqWdS(uYields all links in the pageu.//auhrefiureluinternalN(uparsedufindallugetu
clean_linkuurlparseuurljoinubase_urluNoneuapi_versionuboolusplituLink(uselfuanchoruhrefuurluinternal((u"/tmp/pip-bsqfwp-build/pip/index.pyulinks�s!uHTMLPage.linksccs<x|j�D]}|Vq
Wx|j�D]}|Vq)WdS(N(uexplicit_rel_linksuscraped_rel_links(uselfuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu	rel_linkss	uHTMLPage.rel_linksuhomepageudownloadccs�t|�}x�|jjd�D]�}|jd�r|jd�rt|jd�j��}||@r�|jd�}|jtj|j|��}t	||dd�Vq�qqWdS(u)Yields all links with the given relationsu.//aureluhrefutrustedNF(usetuparsedufindallugetusplitu
clean_linkuurlparseuurljoinubase_urluLinkuFalse(uselfurelsuanchoru
found_relsuhrefuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyuexplicit_rel_linkss
uHTMLPage.explicit_rel_linksc
cs�x�|j|jfD]�}|j|j�}|s7qn|jj|jd|j��}|sdqn|jd�p�|jd�p�|jd�}|s�qn|jtj	|j
|��}t||dddd�VqWdS(	Nuposiiiutrustedu_deprecated_regexFT(u_homepage_reu_download_reusearchucontentu_href_reuendugroupu
clean_linkuurlparseuurljoinubase_urluLinkuFalseuTrue(uselfuregexumatchu
href_matchuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyuscraped_rel_links&s!-uHTMLPage.scraped_rel_linksu[^a-z0-9$&+,/:;=?@.#%_\\|-]cCs|jjdd�|�S(u�Makes sure a link is fully encoded.  That is, if a ' ' shows up in
        the link, it will be rewritten to %20 (while not over-quoting
        % or other characters).cSsdt|jd��S(Nu%%%2xi(uordugroup(umatch((u"/tmp/pip-bsqfwp-build/pip/index.pyu<lambda><su%HTMLPage.clean_link.<locals>.<lambda>(u	_clean_reusub(uselfuurl((u"/tmp/pip-bsqfwp-build/pip/index.pyu
clean_link7s	uHTMLPage.clean_linkNT(uhomepageudownload(u__name__u
__module__u__qualname__u__doc__ureucompileuIu_homepage_reu_download_reuSu_href_reuNoneu__init__u__str__uclassmethoduTrueuget_pageustaticmethodu_handle_failu_get_content_typeupropertyuapi_versionubase_urlulinksu	rel_linksuexplicit_rel_linksuscraped_rel_linksu	_clean_reu
clean_link(u
__locals__((u"/tmp/pip-bsqfwp-build/pip/index.pyuHTMLPageZs([
uHTMLPagecBsv|EeZdZd-d-d-d.dd�Zdd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zedd��Zedd��Zedd��Zdd�Zedd��Zedd ��Zejd!�Zed"d#��Zejd$�Zed%d&��Zed'd(��Zed)d*��Zed+d,��Zd-S(/uLinkcCs1||_||_||_||_||_dS(N(uurlu
comes_fromuinternalutrustedu_deprecated_regex(uselfuurlu
comes_fromuinternalutrustedu_deprecated_regex((u"/tmp/pip-bsqfwp-build/pip/index.pyu__init__As
				u
Link.__init__cCs.|jrd|j|jfSt|j�SdS(Nu%s (from %s)(u
comes_fromuurlustr(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyu__str__Is	uLink.__str__cCsd|S(Nu	<Link %s>((uself((u"/tmp/pip-bsqfwp-build/pip/index.pyu__repr__Osu
Link.__repr__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__eq__RsuLink.__eq__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__ne__UsuLink.__ne__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__lt__XsuLink.__lt__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__le__[suLink.__le__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__gt__^suLink.__gt__cCs|j|jkS(N(uurl(uselfuother((u"/tmp/pip-bsqfwp-build/pip/index.pyu__ge__asuLink.__ge__cCs
t|j�S(N(uhashuurl(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyu__hash__dsu
Link.__hash__cCs\tj|j�\}}}}}tj|jd��p<|}|sXtd|j��|S(Nu/uURL %r produced no filename(uurlparseuurlsplituurlu	posixpathubasenameurstripuAssertionError(uselfu_unetlocupathuname((u"/tmp/pip-bsqfwp-build/pip/index.pyufilenamegs!u
Link.filenamecCstj|j�dS(Ni(uurlparseuurlsplituurl(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyuschemensuLink.schemecCstj|j�dS(Ni(uurlparseuurlsplituurl(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyupathrsu	Link.pathcCsttj|jjd���S(Nu/(usplitextu	posixpathubasenameupathurstrip(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyusplitextvsu
Link.splitextcCs|j�dS(Ni(usplitext(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyuextysuLink.extcCs=tj|j�\}}}}}tj||||df�S(N(uurlparseuurlsplituurlu
urlunsplituNone(uselfuschemeunetlocupathuqueryufragment((u"/tmp/pip-bsqfwp-build/pip/index.pyuurl_without_fragment}s!uLink.url_without_fragmentu#egg=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(u_egg_fragment_reusearchuurluNoneugroup(uselfumatch((u"/tmp/pip-bsqfwp-build/pip/index.pyuegg_fragment�suLink.egg_fragmentu2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs,|jj|j�}|r(|jd�SdS(Ni(u_hash_reusearchuurlugroupuNone(uselfumatch((u"/tmp/pip-bsqfwp-build/pip/index.pyuhash�s
u	Link.hashcCs,|jj|j�}|r(|jd�SdS(Ni(u_hash_reusearchuurlugroupuNone(uselfumatch((u"/tmp/pip-bsqfwp-build/pip/index.pyu	hash_name�s
uLink.hash_namecCs0tj|jjdd�djdd�d�S(Nu#iiu?(u	posixpathubasenameuurlusplit(uself((u"/tmp/pip-bsqfwp-build/pip/index.pyushow_url�su
Link.show_urlcCs�|jpt|jdd�}|dk	r�|r�y%t|jdd�}t|�}Wnttfk
rud}YnX|dks�|dkr�dS|jr�dSdSn|dk	r�dSdS(u�
        Returns True if this link can be verified after download, False if it
        cannot, and None if we cannot determine.
        utrusteduapi_versioniNTF(
utrustedugetattru
comes_fromuNoneuintu
ValueErroru	TypeErroruhashuTrueuFalse(uselfutrusteduapi_version((u"/tmp/pip-bsqfwp-build/pip/index.pyu
verifiable�s	uLink.verifiableNF(u__name__u
__module__u__qualname__uNoneuFalseu__init__u__str__u__repr__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u__hash__upropertyufilenameuschemeupathusplitextuextuurl_without_fragmentureucompileu_egg_fragment_reuegg_fragmentu_hash_reuhashu	hash_nameushow_urlu
verifiable(u
__locals__((u"/tmp/pip-bsqfwp-build/pip/index.pyuLink?s0	uLinkcCs;t|�}|j}|s1t|j�d}nt|�S(uPGet a requirement from the URL, if possible.  This looks for #egg
    in the URLi(uLinkuegg_fragmentusplitextufilenameupackage_to_requirement(uurlulinkuegg_info((u"/tmp/pip-bsqfwp-build/pip/index.pyuget_requirement_from_url�s
	uget_requirement_from_urlcCsatjd|�}|r9|jd�}|jd�}n|}d}|rYd||fS|SdS(u)Translate a name like Foo-1.2 to Foo==1.3u^(.*?)-(dev|\d.*)iiuu%s==%sN(ureusearchugroup(upackage_nameumatchunameuversion((u"/tmp/pip-bsqfwp-build/pip/index.pyupackage_to_requirement�supackage_to_requirement(2u__doc__usysuosureu	mimetypesu	posixpathupip.loguloggerupip.utiluInfunormalize_nameusplitextu
is_prereleaseupip.exceptionsuDistributionNotFounduBestVersionAlreadyInstalleduInstallationErroruInvalidWheelFilenameuUnsupportedWheelupip.backwardcompatuurlparseuurl2pathnameupip.downloadu
PipSessionuurl_to_pathupath_to_urlu	pip.wheeluWheelu	wheel_extupip.pep425tagsusupported_tagsusupported_tags_noarchuget_platformupip._vendoruhtml5liburequestsu
pkg_resourcesupip._vendor.requests.exceptionsuSSLErroru__all__uDEFAULT_MIRROR_HOSTNAMEuINSECURE_SCHEMESuobjectu
PackageFinderu	PageCacheuHTMLPageuLinkuINSTALLED_VERSIONuget_requirement_from_urlupackage_to_requirement(((u"/tmp/pip-bsqfwp-build/pip/index.pyu<module>s6"(	
����

Zerion Mini Shell 1.0