ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/setuptools/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyc

�
�/{Yc@s�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZddlmZddlmZddlmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-dd	lm.Z.dd
l/m0Z0ddl1m2Z2ddl3m4Z4ej5d
�Z6ej5dej7�Z8ej5d�Z9ej5dej7�j:Z;dj<�Z=ddddgZ>dZ?d�Z@d�ZAeBd�ZCeBd�ZDeBd�ZEeBeeBd�ZFeBd�ZGd�ZHej5dej7�ZIeHd ��ZJd!ejKd" ed#�d$jKfZLd%eMfd&��YZNd'eNfd(��YZOdefd)��YZPej5d*�jQZRd+�ZSd,�ZTd-�ZUdd.�ZVd/�ZWd0eMfd1��YZXd2e-j-fd3��YZYejZd4�Z[eVe?�e[�Z[d5�Z\d6�Z]dS(7s#PyPI and direct package downloadingi����N(twraps(
t
CHECKOUT_DISTtDistributiontBINARY_DISTtnormalize_pathtSOURCE_DISTtrequiretEnvironmenttfind_distributionst	safe_nametsafe_versiontto_filenametRequirementtDEVELOP_DIST(tssl_support(tlog(tDistutilsError(turllib2thttplibtStringIOt	HTTPErrorturlparset
urlunparsetunquotet	splituserturl2pathnametname2codepointtunichrturljointurlsplitt
urlunsplittConfigParser(tfilterfalse(t	translate(tstrip_fragment(tget_all_headerss^egg=([-A-Za-z0-9_.]+)$shref\s*=\s*['"]?([^'"> ]+)s�<a href="([^"#]+)">([^<]+)</a>
\s+\(<a (?:title="MD5 hash"
\s+)href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)s([-+.a-z0-9]{2,}):s.tar.gz .tar.bz2 .tar .zip .tgztPackageIndextdistros_for_urltparse_bdist_wininsttinterpret_distro_nameicCs�|j�}d\}}}|jd�r�|jd�rL|d }d}q�|jdd�r~|dd!}|d }d}q�|jd	�r�|d
 }d}q�|jdd
�r�|dd!}|d
 }d}q�n|||fS(s=Return (base,pyversion) or (None,None) for possible .exe names.exes
.win32.exei����twin32s	.win32-pyi�i����i����s.win-amd64.exei�s	win-amd64s
.win-amd64-pyi��N(NNN(tlowertNonetendswitht
startswith(tnameR)tbasetpy_vertplat((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR&.s$
	

	
	

cCs�t|�\}}}}}}t|jd�d�}|dkrk|dkrkt|jd�d�}nd|kr�|jdd�\}}n||fS(Nt/i����ssourceforge.nettdownloadi����t#i(RRtsplit(turltschemetservertpatht
parameterstquerytfragmentR.((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytegg_info_for_urlFsccs�t|�\}}xt|||�D]}|Vq%W|r�tj|�}|r�x1t||jd�|dt�D]}|VqqWq�ndS(sEYield egg or source distribution objects that might be found at a URLit
precedenceN(R<tdistros_for_locationtEGG_FRAGMENTtmatchR'tgroupR(R5tmetadataR.R;tdistR@((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR%Ns	"cCs�|jd�r|d }n|jd�rMd|krMtj|||�gS|jd�r�t|�\}}}|dk	r�t||||t|�Snx>tD]6}|j|�r�|t|� }t|||�Sq�WgS(s:Yield egg or source distribution objects based on basenames.egg.zipi����s.eggt-s.exeN(	R+Rt
from_locationR&R*R'Rt
EXTENSIONStlen(tlocationtbasenameRBtwin_baseR/tplatformtext((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR>Zs

cCs"tt|�tjj|�|�S(sEYield possible egg or source distribution objects based on a filename(R>RtosR8RI(tfilenameRB((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytdistros_for_filenameosc	cs�|jd�}|s^xFt|d�D]1\}}t|�dkr&|jd�r&dSq&Wnxatdt|�d�D]F}t||dj|| �dj||�d|d|d	|�VqxWdS(
s�Generate alternative interpretations of a source distro name

    Note: if `location` is a filesystem filename, you should call
    ``pkg_resources.normalize_path()`` on it before passing it to this
    routine!
    RDiispy2.Nit
py_versionR=RK(R4t	enumerateRGR,trangeRtjoin(	RHRIRBRPR=RKtpartstitp((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR'vs! )ccs�t�}|j}|dkrMxgt|j|�D]}||�|Vq1Wn;x8|D]0}||�}||krT||�|VqTqTWdS(sHList unique elements, preserving order. Remember all elements ever seen.N(tsettaddR*R t__contains__(titerabletkeytseentseen_addtelementtk((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytunique_everseen�s		


cst���fd��}|S(ss
    Wrap a function returning an iterable such that the resulting iterable
    only ever yields unique items.
    cst�||��S(N(R`(targstkwargs(tfunc(sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytwrapper�s(R(RcRd((RcsI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt
unique_values�ss(<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>ccsx�tj|�D]�}|j�\}}tttj|j�jd���}d|ksgd|krx7t	j|�D]#}t
|t|jd���VqwWqqWxdd	D]\}|j
|�}|dkr�t	j||�}|rt
|t|jd���Vqq�q�WdS(
sEFind rel="homepage" and rel="download" links in `page`, yielding URLst,thomepageR2is
<th>Home Pages<th>Download URLi����N(s
<th>Home Pages<th>Download URL(tRELtfinditertgroupsRWtmaptstrtstripR)R4tHREFRt
htmldecodeRAtfindtsearch(R5tpageR@ttagtreltrelstpos((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytfind_external_links�s'(
sPython-urllib/%s setuptools/%sit
setuptoolsitContentCheckercBs)eZdZd�Zd�Zd�ZRS(sP
    A null content checker that defines the interface for checking content
    cCsdS(s3
        Feed a block of data to the hash.
        N((tselftblock((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytfeed�scCstS(sC
        Check the hash. Return False if validation fails.
        (tTrue(Rz((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytis_valid�scCsdS(su
        Call reporter with information about the checker (hash name)
        substituted into the template.
        N((Rztreporterttemplate((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytreport�s(t__name__t
__module__t__doc__R|R~R�(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRy�s		tHashCheckercBsJeZejd�Zd�Zed��Zd�Zd�Z	d�Z
RS(sK(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)=(?P<expected>[a-f0-9]+)cCs(||_tj|�|_||_dS(N(t	hash_namethashlibtnewthashtexpected(RzR�R�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt__init__�s	cCsLt|�d}|st�S|jj|�}|s<t�S||j��S(s5Construct a (possibly null) ContentChecker from a URLi����(RRytpatternRqt	groupdict(tclsR5R;R@((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytfrom_url�scCs|jj|�dS(N(R�tupdate(RzR{((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR|�scCs|jj�|jkS(N(R�t	hexdigestR�(Rz((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR~�scCs||j}||�S(N(R�(RzRR�tmsg((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�s
(R�R�tretcompileR�R�tclassmethodR�R|R~R�(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s				cBsveZdZdd%d&ed�Zed�Zed�Zed�Z	d�Z
d�Zd	�Zd
�Z
d&d�Zd�Zd&d
�Zd�Zd�Zd�Zd�Zd�Zeeed&d�Zeed�Zd�ZdZd�Zd�Zd&d�Zd�Zd�Zd�Zd�Z d�Z!e"ed��Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(RS('s;A distribution index that scans web pages for download URLsshttps://pypi.python.org/simplet*cOs�tj|||�|d|jd� |_i|_i|_i|_tjdj	t
t|���j|_
g|_|r�tjr�|s�tj�r�tj|�|_ntj|_dS(NR1t|(RR�R+t	index_urltscanned_urlstfetched_urlst
package_pagesR�R�RSRkR!R@tallowstto_scanRtis_availabletfind_ca_bundlet
opener_fortopenerRturlopen(RzR�thostst	ca_bundlet
verify_sslRatkw((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�	s			'	!c

CsU||jkr|rdSt|j|<t|�sD|j|�dStt|��}|r�|j|�sodS|jd|�n|s�|s�||jkr�tt	|j
|��dS|j|�s�t|j|<dS|jd|�t|j|<|j|d|�}|dkrdSt|j|j<d|jjdd�j�krZ|j�dS|j}|j�}t|t�s�t|t�r�d}n|jjd	�p�d}|j|d
�}n|j�xBtj|�D]1}t|t|jd���}	|j|	�q�W|j|j �rQt!|dd�d
krQ|j"||�}ndS(s<Evaluate a URL as a possible download, and maybe retrieve itNsFound link: %ss
Reading %ss<Download error on %s: %%s -- Some packages may not be found!thtmlscontent-typetslatin-1tcharsettignoreitcodei�(#R�R}t
URL_SCHEMEtprocess_filenametlistR%turl_oktdebugR�RkRXtinfotopen_urlR*R5theaderstgetR)tclosetreadt
isinstanceRlRt	get_paramtdecodeRnRiRRoRAtprocess_urlR,R�tgetattrt
process_index(
RzR5tretrievetdiststfR.RrR�R@tlink((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�sN



!
		
*cCs�tjj|�s&|jd|�dStjj|�r�|r�tjj|�}x9tj|�D]%}|jtjj||�t	�qaWnt
|�}|r�|jd|�tt
|j|��ndS(Ns
Not found: %ss	Found: %s(RMR8texiststwarntisdirtrealpathtlistdirR�RSR}ROR�R�RkRX(RztfntnestedR8titemR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�Hs&cCs}t|�}|r-|jd�j�dksF|jt|�d�rJtSd}|rit||��n|j||�dS(NitfilesN
Note: Bypassing %s (disallowed host; see http://bit.ly/1dg9ijs for details).
(R�RAR)R�RR}RR�(RzR5tfataltsR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�Xs:cCsfx_|D]W}tjj|�rx<tj|�D](}|jd�r/|j||�q/q/WqqWdS(Ns	.egg-link(RMR8R�R�R+t
scan_egg_link(Rztsearch_pathR�tentry((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytscan_egg_linkscs

cCs�gttjttjj||���D]}|r(|^q(}t|�dkr�xXttjj||d��D]4}tjj||�|_	t
|_|j|�qrWndS(Nii(
RkRlRmtopenRMR8RSRGRRHRR=RX(RzR8R�t_ftlinesRC((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�js4&	c
s�fd�}xQtj|�D]@}y&|t|t|jd����Wqtk
r^qXqW||�\}}|r
xyt||�D]h}t|�\}}	|jd�r�|	r�|r�|d||f7}q��j	|�n�j
|�q�Wtjd�|�SdSdS(s#Process the contents of a PyPI pagecs�|j�j�r�ttt|t�j�jd���}t|�dkr�d|dkr�t|d�}t|d�}t	�j
j|j�i�|<t
|�t
|�fSndS(NR1iR3ii(NN(R,R�R�RkRRGR4R	R
R}R�t
setdefaultR)RR*(R�RTtpkgtver(Rz(sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytscanus%"is.pys
#egg=%s-%scSsd|jddd�S(Ns<a href="%s#md5=%s">%s</a>iii(RA(tm((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt<lambda>�sR�N(
RnRiRRoRAt
ValueErrorRwR<R+tneed_version_infotscan_urltPYPI_MD5tsub(
RzR5RrR�R@R�R�tnew_urlR.tfrag((RzsI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�ss$&

cCs|jd|�dS(NsPPage at %s links to .py file(s) without version info; an index scan is required.(tscan_all(RzR5((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��scGsO|j|jkr;|r+|j||�n|jd�n|j|j�dS(Ns6Scanning index of all packages (this may take a while)(R�R�R�R�R�(RzR�Ra((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s
cCs�|j|j|jd�|jj|j�sN|j|j|jd�n|jj|j�ss|j|�nx3t|jj|jd��D]}|j|�q�WdS(NR1((	R�R�tunsafe_nameR�R�R[tproject_nametnot_found_in_indexR�(RztrequirementR5((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt
find_packages�s%cCsk|j�|j|�x8||jD])}||kr;|S|jd||�q%Wtt|�j||�S(Ns%s does not match %s(tprescanR�R[R�tsuperR$tobtain(RzR�t	installerRC((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s

cCsi|j|jd|�|j�se|j�tj|�td|jjtj	j
|�f��ndS(s-
        checker is a ContentChecker
        sValidating %%s checksum for %ss7%s validation failed for %s; possible download problem?N(R�R�R~R�RMtunlinkRR�R-R8RI(RztcheckerRNttfp((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt
check_hash�s

cCsrxk|D]c}|jdksJt|�sJ|jd�sJtt|��rZ|j|�q|jj|�qWdS(s;Add `urls` to the list that will be prescanned for searchessfile:N(R�R*R�R,R�R%R�tappend(RzturlsR5((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytadd_find_links�s

cCs2|jr%tt|j|j��nd|_dS(s7Scan urls scheduled for prescanning (e.g. --find-links)N(R�R�RkR�R*(Rz((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s	cCsN||jr |jd}}n|jd}}|||j�|j�dS(Ns#Couldn't retrieve index page for %rs3Couldn't find index page for %r (maybe misspelled?)(R[R�R�R�R�(RzR�tmethR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s

cCs�t|t�s�t|�}|r||j|jd�||�}t|�\}}|jd�rx|j|||�}n|Stj	j
|�r�|Sytj|�}Wq�tk
r�t
d|f��q�Xnt|j||�dd�S(sLocate and/or download `spec` to `tmpdir`, returning a local path

        `spec` may be a ``Requirement`` object, or a string containing a URL,
        an existing local filename, or a project/version requirement spec
        (i.e. the string form of a ``Requirement`` object).  If it is the URL
        of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
        that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
        automatically created alongside the downloaded file.

        If `spec` is a ``Requirement`` object or a string containing a
        project/version requirement spec, this method returns the location of
        a matching distribution (possibly after downloading it to `tmpdir`).
        If `spec` is a locally existing file or directory name, it is simply
        returned unchanged.  If `spec` is a URL, it is downloaded to a subpath
        of `tmpdir`, and the local filename is returned.  Various errors may be
        raised if a problem occurs during downloading.
        is.pys1Not a URL, existing file, or requirement spec: %rRHN(R�RR�t
_download_urlRAR<R+t	gen_setupRMR8R�tparseR�RR�tfetch_distributionR*(RztspecttmpdirR6tfoundR.R;((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR2�s"
c		sK�jd|�i�d}d����fd�}|rc�j��j|�||�}n|dk	r�|p�|||�}n|dkr��jdk	r��j�||�}n|dkr�|r��j|�||�}n|dkr�jd�rdpd|�n/�jd|�|jd�j|j|��SdS(	s|Obtain a distribution suitable for fulfilling `requirement`

        `requirement` must be a ``pkg_resources.Requirement`` instance.
        If necessary, or if the `force_scan` flag is set, the requirement is
        searched for in the (online) package index as well as the locally
        installed packages.  If a distribution matching `requirement` is found,
        the returned distribution's ``location`` is the value you would have
        gotten from calling the ``download()`` method with the matching
        distribution's URL or filename.  If no matching distribution is found,
        ``None`` is returned.

        If the `source` flag is set, only source distributions and source
        checkout links will be considered.  Unless the `develop_ok` flag is
        set, development and system eggs (i.e., those using the ``.egg-info``
        format) will be ignored.
        sSearching for %scs�|dkr�}nx�||jD]q}|jtkrn�rn|�kr#�jd|�d�|<q#q#n||kr#|jtks��r#|Sq#WdS(Ns&Skipping development or system egg: %si(R*R[R=R
R�R(treqtenvRC(t
develop_okRztskippedtsource(sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRp1s	
"s2No local packages or download links found for %s%ssa source distribution of R�sBest match: %sRHN(	R�R*R�R�R�R�tcloneR2RH(	RzR�R�t
force_scanR�R�tlocal_indexRCRp((R�RzR�R�sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�s.




cCs/|j||||�}|dk	r+|jSdS(s3Obtain a file suitable for fulfilling `requirement`

        DEPRECATED; use the ``fetch_distribution()`` method now instead.  For
        backward compatibility, this routine is identical but returns the
        ``location`` of the downloaded distribution instead of a distribution
        object.
        N(R�R*RH(RzR�R�R�R�RC((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytfetch[scCsqtj|�}|rLgt||jd�d�D]}|jr1|^q1pOg}t|�dkrBtjj	|�}tjj
|�|kr�tjj||�}ddlm
}	|	||�s�tj||�|}q�nttjj|d�d�}
|
jd|dj|djtjj|�df�|
j�|S|ratd||f��ntd	��dS(
Nii����(tsamefilessetup.pytwsIfrom setuptools import setup
setup(name=%r, version=%r, py_modules=[%r])
is�Can't unambiguously interpret project/version identifier %r; any dashes in the name or version should be escaped using underscores. %rspCan't process plain .py files without an '#egg=name-version' suffix to enable automatic setup script generation.(R?R@R'RAR*tversionRGRMR8RItdirnameRStsetuptools.command.easy_installRtshutiltcopy2R�twriteR�tsplitextR�R(RzRNR;R�R@tdR�RItdstRR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�hs44
i c
Cs�|jd|�d	\}}}zOtj|�}|jt|��}t|t�rwtd||j	|j
f��n|j�}d}|j}	d}
d|kr�t|d�}t
tt|��}
|j||||	|
�nt|d�}x`trU|j|	�}|rQ|j|�|j|�|d7}|j||||	|
�q�Pq�W|j|||�|SWd|r�|j�n|r�|j�nXdS(
NsDownloading %ssCan't download %s: %s %sii����scontent-lengthsContent-Lengthtwbi(NNN(R�R*R�R�R�R"R�RRR�R�tdl_blocksizeR#tmaxRktintt
reporthookR�R}R�R|R	R�R�(
RzR5RNtfpR�R�R�R�tblocknumtbstsizetsizesR{((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt_download_to�s>		



cCsdS(N((RzR5RNRtblksizeR((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�scCs�|jd�rt|�Syt||j�SWn�ttjfk
r�tj�d}dj	g|j
D]}t|�^qf�}|r�|j||�q�t
d||f��n'tjk
r�tj�d}|Stjk
r/tj�d}|r|j||j�q�t
d||jf��n�tjk
r�tj�d}|rk|j||j�q�t
d||jf��nStjk
r�tj�d}|r�|j||�q�t
d||f��nXdS(Nsfile:it s%s %ssDownload error for %s: %ss;%s returned a bad status line. The server might be down, %s(R,t
local_opentopen_with_authR�R�Rt
InvalidURLtsystexc_infoRSRaRlR�RRRtURLErrortreasont
BadStatusLinetlinet
HTTPException(RzR5twarningtvtargR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s@
+cCs<t|�\}}|rLx7d|krH|jdd�jdd�}qWnd}|jd�rn|d }ntjj||�}|dks�|jd	�r�|j||�S|d
ks�|jd�r�|j||�S|jd�r�|j	||�S|d
krt
t|�d�S|j|t
�|j||�SdS(Ns..t.s\t_t__downloaded__s.egg.zipi����tsvnssvn+tgitsgit+shg+R�i(R<treplaceR+RMR8RSR,t
_download_svnt
_download_gitt_download_hgRRR�R}t_attempt_download(RzR6R5R�R-R;RN((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s$%
cCs|j|t�dS(N(R�R}(RzR5((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��scCsK|j||�}d|jdd�j�krC|j|||�S|SdS(NR�scontent-typeR�(RR�R)t_download_html(RzR5RNR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR0scCs�t|�}xW|D]O}|j�rtjd|�r^|j�tj|�|j||�SPqqW|j�tj|�td|��dS(Ns <title>([^- ]+ - )?Revision \d+:sUnexpected HTML page found at (	R�RmR�RqR�RMR�R-R(RzR5R�RNR�R"((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR1	s




c
CsT|jdd�d}d}|j�jd�r#d|kr#t|�\}}}}}}	|r#|jd�r#d|d	kr#|d	jdd�\}}t|�\}
}|
r d
|
kr�|
jd
d�\}}
d||
f}n
d|
}|}t||||||	f�}q q#n|jd
||�tjd|||f�|S(NR3iiR�ssvn:t@s//R1it:s --username=%s --password=%ss --username=s'Doing subversion checkout from %s to %sssvn checkout%s -q %s %s(	R4R)R,RRRR�RMtsystem(RzR5RNtcredsR6tnetlocR8RVtqR�tauththosttusertpw((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR-s"!&
'cCs�t|�\}}}}}|jdd�d}|jdd�d}d}d|krt|jdd�\}}nt||||df�}||fS(Nt+ii����R3iR2R�(RR4R*trsplitR(R5t
pop_prefixR6R6R8R:R�trev((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt_vcs_split_rev_from_url,scCs�|jdd�d}|j|dt�\}}|jd||�tjd||f�|dk	r�|jd|�tjd||f�n|S(	NR3iiR>sDoing git clone from %s to %ssgit clone --quiet %s %ssChecking out %ss"(cd %s && git checkout --quiet %s)(R4R@R}R�RMR4R*(RzR5RNR?((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR.>s	cCs�|jdd�d}|j|dt�\}}|jd||�tjd||f�|dk	r�|jd|�tjd||f�n|S(	NR3iiR>sDoing hg clone from %s to %sshg clone --quiet %s %ssUpdating to %ss(cd %s && hg up -C -r %s >&-)(R4R@R}R�RMR4R*(RzR5RNR?((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR/Ns	cGstj||�dS(N(RR�(RzR�Ra((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�^scGstj||�dS(N(RR�(RzR�Ra((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�ascGstj||�dS(N(RR�(RzR�Ra((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�ds(R�N()R�R�R�R*R}R�tFalseR�R�R�R�R�R�R�R�R�R�R�R�R�R�R2R�RR�RRRR�R�R�R0R1R-tstaticmethodR@R.R/R�R�R�(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR$sL
0				*									)A
	*	$	(									s!&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?cCs3t|t�s|S|dkr)t|�St|�S(Ni�(R�RRtchr(tc((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytuchrks

cCs{|jd�}|jd�r4t|dd�}n=|jd�rVt|d�}ntj||jd��}t|�S(Nis#xiiR3i(RAR,RRR�RE(R@twhat((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt
decode_entityqscCs
tt|�S(s'Decode HTML entities in the given text.(t
entity_subRG(ttext((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRo{scs�fd�}|S(Ncs��fd�}|S(Ncs?tj�}tj��z�||�SWdtj|�XdS(N(tsockettgetdefaulttimeouttsetdefaulttimeout(RaRbtold_timeout(Rcttimeout(sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt_socket_timeout�s

((RcRO(RN(RcsI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRO�s((RNRO((RNsI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytsocket_timeouts	cCsCt|�}|j�}tj|�}|j�}|jdd�S(sq
    A function compatible with Python 2.3-3.3 that will encode
    auth from a URL suitable for an HTTP header.
    >>> str(_encode_auth('username%3Apassword'))
    'dXNlcm5hbWU6cGFzc3dvcmQ='

    Long auth strings should not cause a newline to be inserted.
    >>> long_auth = 'username:' + 'password'*10
    >>> chr(10) in str(_encode_auth(long_auth))
    False
    s
R�(Rtencodetbase64tencodestringR�R,(R8tauth_st
auth_bytest
encoded_bytestencoded((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt_encode_auth�s
t
CredentialcBs)eZdZd�Zd�Zd�ZRS(s:
    A username/password pair. Use like a namedtuple.
    cCs||_||_dS(N(tusernametpassword(RzRZR[((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s	ccs|jV|jVdS(N(RZR[(Rz((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt__iter__�scCsdt|�S(Ns%(username)s:%(password)s(tvars(Rz((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt__str__�s(R�R�R�R�R\R^(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRY�s		t
PyPIConfigcBs2eZd�Zed��Zd�Zd�ZRS(cCsutjdddgd�}tjj||�tjjtjjd�d�}tjj|�rq|j	|�ndS(s%
        Load from ~/.pypirc
        RZR[t
repositoryR�t~s.pypircN(
tdicttfromkeysRR�RMR8RSt
expanduserR�R�(Rztdefaultstrc((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR��s
!cCsMg|j�D]$}|j|d�j�r
|^q
}tt|j|��S(NR`(tsectionsR�RmRbRkt_get_repo_cred(Rztsectiontsections_with_repositories((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytcreds_by_repository�s$cCsO|j|d�j�}|t|j|d�j�|j|d�j��fS(NR`RZR[(R�RmRY(RzRitrepo((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRh�scCs7x0|jj�D]\}}|j|�r|SqWdS(s�
        If the URL indicated appears to be a repository defined in this
        config, return the credential for that repository.
        N(RktitemsR,(RzR5R`tcred((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pytfind_credential�s(R�R�R�tpropertyRkRhRo(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR_�s			cCs�t|�\}}}}}}|jd�r?tjd��n|d	kr`t|�\}}	nd
}|s�t�j|�}
|
r�t|
�}|
j	|f}t
jd|�q�n|rdt|�}t
||	||||f�}tj|�}
|
jd|�ntj|�}
|
jdt�||
�}|r�t|j�\}}}}}}||kr�||	kr�t
||||||f�|_q�n|S(s4Open a urllib2 request, handling HTTP authenticationR3snonnumeric port: ''thttpthttpss*Authenticating as %s for %s (from .pypirc)sBasic t
Authorizations
User-Agent(RqRrN(RR+RRRR*R_RoRlRZRR�RXRRtRequestt
add_headert
user_agentR5(R5R�R6R6R8tparamsR:R�R8R9RnR�R�trequestRts2th2tpath2tparam2tquery2tfrag2((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyR�s2!'cCs|S(N((R5((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt
fix_sf_urlscCsut|�\}}}}}}t|�}tjj|�rItj|�S|jd�r=tjj|�r=g}x�tj	|�D]�}	|	dkr�t
tjj||	�d�}
|
j�}|
j
�Pn.tjjtjj||	��r�|	d7}	n|jd|	|	f�q�Wd|ddj|�}d\}}
nd\}}
}id
d6}t|||
|t|��S(s7Read a local path, with special support for directoriesR1s
index.htmltrs<a href=%r>%s</a>s<html><head><title>%s</title>s</head><body>%s</body></html>s
i�tOKi�sPath not founds	Not founds	text/htmlscontent-type(i�R�(i�sPath not founds	Not found(RRRMR8tisfileRR�R+R�R�R�RSR�R�R�RR(R5R6R7R8tparamR:R�RNtfilesR�RtbodytstatustmessageR�((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyRs*
!
!

(^R�RRMR�RRJRRR�t	functoolsRt
pkg_resourcesRRRRRRRRR	R
RRR
RxRt	distutilsRtdistutils.errorsRtsetuptools.compatRRRRRRRRRRRRRRRR tfnmatchR!tsetuptools.py26compatR"tsetuptools.py27compatR#R�R?tIRnR�R@R�R4RFt__all__t_SOCKET_TIMEOUTR&R<R*R%R>ROR'R`ReRhRwRRvtobjectRyR�R$R�RHRERGRoRPRXRYR_R�RRR(((sI/opt/alt/python33/lib/python3.3/site-packages/setuptools/package_index.pyt<module>spXd					"	
!!��e		
		'+	

Zerion Mini Shell 1.0