Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ϏRc@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
mZddlmZmZmZmZmZmZddlmZmZmZddlmZddlmZddd	d
ddd
ddddddddddddddddddgZd „Ze d!„Z!d"„Z"d#„Z#d$d%„Z$ddd&„Z&dd'„Z'd(„Z(d)„Z)d*e*fd+„ƒYZ+e+ƒZ,[+ej-d,ej.ƒZ/d-„Z0d.„Z1d/„Z2d0„Z3d1„Z4d2„Z5d3„Z6d4„Z7d5„Z8d6„Z9d7„Z:d8„Z;d9„Z<d:„Z=d;„Z>d<„Z?e@dKe@e d@„ZAdA„ZBdB„ZCdC„ZDe@dD„ZEdE„ZFdF„ZGdG„ZHdH„ZIe@dde@ejJdddI„ZKdJ„ZLdS(LiÿÿÿÿN(tInstallationErrort
BadCommandtPipError(tWindowsErrortstring_typest	raw_inputtconsole_to_strt	user_sitetPermissionError(t
site_packagestrunning_under_virtualenvtvirtualenv_no_global(tlogger(tversiontrmtreetdisplay_patht
backup_dirtfind_commandtasktInftnormalize_nametsplitexttformat_sizetis_installable_dirtis_svn_paget
file_contentstsplit_leading_dirthas_leading_dirtmake_path_relativetnormalize_pathtrenamestget_terminal_sizetget_progt
unzip_filet
untar_filetcreate_download_cache_foldertcache_downloadtunpack_filetcall_subprocesscCsOy.tjjtjdƒdkr-dtjSWntttfk
rJnXdS(Nis__main__.pys-cs	%s -m piptpip(s__main__.pys-c(	tostpathtbasenametsystargvt
executabletAttributeErrort	TypeErrort
IndexError(((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR scCstj|d|dtƒdS(Nt
ignore_errorstonerror(tshutilRtrmtree_errorhandler(tdirR1((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR(scCs¼|d \}}|tkr/|jddkpj|tkrN|jddkpj|tkoj|jddkss‚ntj|ƒjtj@tjkr›‚ntj|tj	ƒ||ƒdS(sÑOn Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.iiii
iN(
RtargstOSErrorRR(tstattst_modetS_IREADtchmodtS_IWRITE(tfuncR)texc_infotexctypetvalue((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR4-s"cCs^tjjtjj|ƒƒ}|jtjƒtjjƒrZd|ttjƒƒ}n|S(sTGives the display value for a given path, making it relative to cwd
    if possible.t.(R(R)tnormcasetabspatht
startswithtgetcwdtseptlen(R)((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR@ss.bakcCsKd}|}x4tjj||ƒrB|d7}|t|ƒ}qW||S(s\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)i(R(R)texistststr(R5texttnt	extension((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRIs
cCsI|dkr0tjjddƒjtjƒ}nt|tƒrK|g}n|dkrctƒ}ng|j	ƒjtjƒD]}t
|ƒr||^q|}tjj|ƒdj	ƒ|krÈdg}nxj|D]b}tjj
||ƒ}x.|D]&}||}tjj|ƒrñ|SqñWtjj|ƒrÏ|SqÏWtd|ƒ‚dS(s<Searches the PATH for the given command and returns its pathtPATHtisCannot find command %rN(tNoneR(tenvirontgettsplittpathsept
isinstanceRtget_pathexttlowerRGR)RtjointisfileR(tcmdtpathstpathextRJR)tcmd_pathtcmd_path_ext((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRTs$$7"


cCsF|dkr-tjjddddgƒ}ntjjd|ƒ}|S(s9Returns the path extensions from environment or a defaults.COMs.EXEs.BATs.CMDtPATHEXTN(ROR(RSRWRPRQ(tdefault_pathextR[((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRUos!cCs=x-tjjddƒD]}||kr|SqWt||ƒS(NtPIP_EXISTS_ACTIONRN(R(RPRQR(tmessagetoptionstaction((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytask_path_existswscCsxxqtjjdƒr(td|ƒ‚nt|ƒ}|jƒjƒ}||krmd|dj|ƒfGHq|SqdS(s@Ask the message interactively, with the given possible responsestPIP_NO_INPUTs7No input was expected ($PIP_NO_INPUT set); question: %ss<Your response (%r) was not one of the expected responses: %ss, N(R(RPRQt	ExceptionRtstripRVRW(RaRbtresponse((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR~st_InfcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(sI am bigger than everything!cCs||krtStSdS(N(tTruetFalse(tselftother((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__eq__scCs|j|ƒS(N(Rn(RlRm((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__ne__•scCstS(N(Rk(RlRm((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__lt__˜scCstS(N(Rk(RlRm((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__le__›scCstS(N(Rj(RlRm((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__gt__žscCstS(N(Rj(RlRm((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__ge__¡scCsdS(NR((Rl((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt__repr__¤s(
t__name__t
__module__t__doc__RnRoRpRqRrRsRt(((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRiŒs						s[^a-z]cCstjd|jƒƒS(Nt-(t
_normalize_retsubRV(tname((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR¯scCsX|dkrd|ddS|d	kr4d|dS|dkrLd|dSd|SdS(
Niès%.1fMBg@@i
s%ikBs%.1fkBs%ibytesi@Bi'((tbytes((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR³scCsEtjj|ƒstStjj|dƒ}tjj|ƒrAtStS(s@Return True if `path` is a directory containing a setup.py file.ssetup.py(R(R)tisdirRkRWRXRj(R)tsetup_py((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR¾scCs(tjd|ƒo'tjd|tjƒS(sJReturns true if the page appears to be the index page of an svn repositorys<title>[^<]*Revision \d+:s#Powered by (?:<a[^>]*?>)?Subversion(tretsearchtI(thtml((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRÈscCs8t|dƒ}z|jƒjdƒSWd|jƒXdS(Ntrbsutf-8(topentreadtdecodetclose(tfilenametfp((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRÎscCs t|ƒ}|jdƒjdƒ}d|krvd|krZ|jdƒ|jdƒksfd|krv|jddƒSd|kr’|jddƒS|dfSdS(Nt/s\iRN(RItlstriptfindRR(R)((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRÖs6cCs\d}xO|D]G}t|ƒ\}}|s/tS|dkrD|}q
||kr
tSq
WtS(syReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)N(RORRkRj(RZt
common_prefixR)tprefixtrest((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRâs
	cCs7tjj|ƒ}tjj|ƒ}tjjtjj|ƒƒ}tjjtjj|ƒƒ}|jtjjƒjtjjƒ}|jtjjƒjtjjƒ}x>|rè|rè|d|dkrè|j	dƒ|j	dƒq«Wdgt
|ƒ||g}|dgkr$dtjjStjjj|ƒS(s
    Make a filename relative, where the filename path, and it is
    relative to rel_to

        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/usr/share/another-place/src/Directory')
        '../../../something/a-file.pth'
        >>> make_relative_path('/usr/share/something/a-file.pth',
        ...                    '/home/user/src/Directory')
        '../../../usr/share/something/a-file.pth'
        >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/')
        'a-file.pth'
    is..RNRA(R(R)R*tdirnametnormpathRCRgRFRRtpopRGRW(R)trel_tot
path_filenamet
path_partstrel_to_partst
full_parts((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRñs$$#
cCstjjtjj|ƒƒS(sN
    Convert a path to its canonical, case-normalized, absolute version.

    (R(R)RBtrealpath(R)((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRscCsOtj|ƒ\}}|jƒjdƒrE|d|}|d }n||fS(s,Like os.path.splitext, but take off .tar toos.tariüÿÿÿ(t	posixpathRRVtendswith(R)tbaseRJ((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRs

cCs§tjj|ƒ\}}|rG|rGtjj|ƒrGtj|ƒntj||ƒtjj|ƒ\}}|r£|r£ytj|ƒWq£tk
rŸq£XndS(s7Like os.renames(), but handles renaming across devices.N(	R(R)RRRHtmakedirsR3tmovet
removedirsR7(toldtnewtheadttail((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyRs
cCs)tƒs
tSt|ƒjttjƒƒS(s›
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    (R
RjRRDR+RŽ(R)((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytis_local0s	cCstt|ƒƒS(s
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    (R£t
dist_location(tdist((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt
dist_is_local<scCs-tr%tt|ƒƒjttƒƒStSdS(sF
    Return True if given Distribution is installed in user site.
    N(RRR¤RDRk(R¥((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytdist_in_usersiteGscCstt|ƒƒjttƒƒS(sa
    Return True if given Distribution is installed in distutils.sysconfig.get_python_lib().
    (RR¤RDR	(R¥((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytdist_in_site_packagesPscCs)ddlm}|j|gƒ}|jS(s$Is distribution an editable install?iÿÿÿÿ(tFrozenRequirement(R'R©t	from_distteditable(R¥R©treq((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytdist_is_editableWst
setuptoolsR'tpythoncCs›|rt}n	d„}|r*d„}n	d„}|rEd„}n	d„}gtjD]?}||ƒrX|j|krX||ƒrX||ƒrX|^qXS(sÌ
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to ('setuptools', 'pip', 'python'). [FIXME also
    skip virtualenv?]

    If ``editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    cSstS(N(Rj(td((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt<lambda>tscSstS(N(Rj(R°((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR±wscSst|ƒS(N(R­(R°((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR±yscSs
t|ƒS(N(R­(R°((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR±|scSstS(N(Rj(R°((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR±~s(R¦t
pkg_resourcestworking_settkey(t
local_onlytskiptinclude_editablesteditables_onlyt
local_testt
editable_testteditables_only_testR°((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytget_installed_distributions^s				cCs¸g}tƒrNtƒr(|jtƒqq|jtƒtrq|jtƒqqn#trd|jtƒn|jtƒx@|D]8}tjj||jƒd}tjj	|ƒrx|SqxWdS(s
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE  (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations.
    This method will just return the first one found.
    s	.egg-linkN(
R
RtappendR	RR(R)RWtproject_nameRX(R¥tsitestsitetegglink((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt
egg_link_pathˆs		


cCst|ƒ}|r|S|jS(sÿ
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    (RÂtlocation(R¥tegg_link((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR¤ªscCsÉd„}|dƒp*|dƒp*|dƒ}|sxy8tjtjƒtjƒ}||ƒ}tj|ƒWqxqxXn|s«tjjddƒtjjddƒf}nt|dƒt|dƒfS(	slReturns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window.cSs{yLddl}ddl}ddl}|jd|j||jdƒƒ}WndSX|dkrgdS|dkrwdS|S(Niÿÿÿÿthht1234i(ii(ii(tfcntlttermioststructtunpacktioctlt
TIOCGWINSZRO(tfdRÇRÈRÉtcr((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pytioctl_GWINSZ»siiitLINESitCOLUMNSiP(R(R„tctermidtO_RDONLYR‡RPRQtint(RÏRÎRÍ((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR¸s	$-c
	Csœtjj|ƒs"tj|ƒnt|dƒ}zYtj|ƒ}t|jƒƒoX|}x+|j	ƒD]}|j
}|j|ƒ}|}	|r¥t|ƒd}	ntjj
||	ƒ}	tjj|	ƒ}
tjj|
ƒsîtj|
ƒn|	jdƒs|	jdƒr1tjj|	ƒs…tj|	ƒq…qht|	dƒ}z|j|ƒWd|jƒ|jd?}|r„tj|	|ƒnXqhWWd|jƒXdS(sMUnzip the file (zip file located at filename) to the destination
    locationRƒiRŠs\twbNi(R(R)RHRœR„tzipfiletZipFileRtnamelisttinfolistRˆR…RRWRRštwriteR‡t
external_attrR;(
RˆRÃtflattentzipfptziptleadingtinfoR{tdatatfnR5R‰tunix_attributes((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR!Ös6	

c	CsÜtjj|ƒs"tj|ƒn|jƒjdƒsL|jƒjdƒrUd}nh|jƒjdƒs|jƒjdƒrˆd}n5|jƒjdƒr¦d}ntjd	|ƒd
}tj	||ƒ}zût
g|jƒD]}|jdkrâ|j^qâƒ}x½|jƒD]¯}|j}|dkr7qn|rPt
|ƒd}ntjj||ƒ}|jƒr–tjj|ƒsÅtj|ƒqÅq|jƒróy|j||ƒWqÅtjƒd}tjd
||j|fƒqqÅXqy|j|ƒ}	WnGttfk
rOtjƒd}tjd
||j|fƒqnXtjjtjj|ƒƒsŠtjtjj|ƒƒnt	|dƒ}
ztj|	|
ƒWd|
jƒX|	jƒqWWd|jƒXdS(sIUntar the file (tar file located at filename) to the destination locations.gzs.tgzsr:gzs.bz2s.tbzsr:bz2s.tartrs-Cannot determine compression type for file %ssr:*tpax_global_headeris/In the tar file %s the member %s is invalid: %sRÕN(R(R)RHRœRVRšRtwarnttarfileR„Rt
getmembersR{RRWR}tissymt_extract_memberR+R>textractfiletKeyErrorR.RR3tcopyfileobjR‡(RˆRÃtmodettartmemberRßRâR)teR‰tdestfp((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR"üsd*	*		!	
cCs@tjd8_tjd|ƒtjd7_tj|ƒdS(Nis&Creating supposed download cache at %s(RtindenttnotifyR(Rœ(tfolder((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR#<scCsUtjdt|ƒƒtj||ƒt|ddƒ}|j|ƒ|jƒdS(NsStoring download in cache at %ss
.content-typetw(RRôRR3tcopyfileR„RÚR‡(ttarget_filet
temp_locationtcontent_typeR‰((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR$Cs

c
CsCtjj|ƒ}|dksZ|jdƒsZ|jdƒsZ|jdƒsZtj|ƒrzt||d|jdƒƒnÅ|dks±tj|ƒs±t	|ƒdj
ƒdkrÁt||ƒn~|r|jd
ƒrt
t|ƒƒrddlm}|d|jƒj|ƒn*tjd|||fƒtd|ƒ‚dS(Nsapplication/zips.zips	.pybundles.whlRÜsapplication/x-gzipis.tars.tar.gzs.tar.bz2s.tgzs.tbzs	text/htmliÿÿÿÿ(t
Subversionssvn+sZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formats%Cannot determine archive format of %s(s	.pybundles.whl(s.tars.tar.gzs.tar.bz2s.tgzs.tbz(R(R)R˜RšRÖt
is_zipfileR!Rçt
is_tarfileRRVR"RDRRtpip.vcs.subversionRûturlRÊRtfatalR(RˆRÃRútlinkRû((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR%Ks$ 	cCsá|dkr‹g}xd|D]\}	d|	ksOd|	ksOd|	ksOd|	krhd|	jddƒ}	n|j|	ƒqWdj|ƒ}n|ršd}
n	tj}
tj|d|ƒtj	j
ƒ}|rÜ|j|ƒny4tj|dtj
d	dd
|
d|d|ƒ}Wn;tk
rMtjƒd
}
tjd|
|fƒ‚nXg}|
dk	r|j}
xÌt|
jƒƒ}|sˆPn|jƒ}|j|dƒ|r||ƒ}t|tƒrÕ|\}}ntj||ƒtj|ƒstjƒqqltj|ƒqln!|jƒ\}}|p2dg}|jƒ|jrÄ|r¤|r…tjd|ƒtjdj|ƒdƒntd||j|fƒ‚qÄtj d||j|fƒn|
dk	rÝdj|ƒSdS(Nt s
t"t's"%s"s\"sRunning command %ststderrtstdintstdouttcwdtenvis#Error %s while executing command %sRNs Complete output from command %s:s)
----------------------------------------s*Command %s failed with error code %s in %ss"Command %s had error code %s in %s(!ROtreplaceR½RWt
subprocesstPIPERtlogR(RPtcopytupdatetPopentSTDOUTRfR+R>RRRtreadlinetrstripRTttupletstdout_level_matchest
show_progressRàtcommunicatetwaitt
returncodeRôRRæ(RYtshow_stdoutt
filter_stdoutRtraise_on_returncodet
command_leveltcommand_desct
extra_environt	cmd_partstpartRR	tprocRñt
all_outputtlinetleveltreturned_stdouttreturned_stderr((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyR&dsp
0		
	
	c
Cstj|ƒ}|dkrtStj|ƒ}tg|D]@}tg|D]'}|tdddddgƒk^qHƒ^q8ƒS(sØ
    Attempt to determine if this is a pre-release using PEP386/PEP426 rules.

    Will return True if it is a pre-release and False if not. Versions are
    assumed to be a pre-release if they cannot be parsed.
    tatbtctrctdevN(R
tsuggest_normalized_versionRORjtnormalized_keytanytset(tverst
normalizedtparsedtxty((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt
is_prerelease§s
(s
setuptoolsspipspython(MR+R3R(R8RR™R²RÖRçRttextwraptpip.exceptionsRRRtpip.backwardcompatRRRRRRt
pip.locationsR	R
Rtpip.logRtpip.vendor.distlibR
t__all__R RkRR4RRRORRURdRtobjectRiRtcompileRRyRRRRRRRRRRRR£R¦R§R¨R­RjR¼RÂR¤RR!R"R#R$R%tDEBUGR&R6(((s=/home/tvault/.virtenv/lib/python2.7/site-packages/pip/util.pyt<module>s.															
															'	"		&	@				?