File "__init__.cpython-36.opt-1.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python3.6/site-packages/pip/utils/__pycache__/__init__.cpython-36.opt-1.pyc
File size: 22.06 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

3

Pfml@sddlmZddlmZddlZddlZddlZddlZddlZ	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlmZddlmZmZmZddlmZmZmZmZmZmZddl m!Z!ddl"m#Z#dd	l$m%Z%dd
l&m'Z'e%rddlm(Z)nddlm)Z)d
ddddddddddddddddddd d!d"d#d$gZ*e	j+e,Z-dzZ.d{Z/d|Z0d}Z1e0e.e1e/Z2e0e1Z3yddl4Z4e3e.7Z3Wn e5k
re-j6d1YnXyddl7Z7e3e/7Z3Wn e5k
re-j6d2YnXd3d4Z8d5d!Z9d6dZ:e'd7d8d9d~d;d
Z;d<d=Z<d>dZ=dd@dZ>dAdBZ?dCdZ@dDdZAdEdZBdFdZCdGdZDejEfdHdIZFdJdZGdKdZHddMdZIdNdZJdOdZKdPdQZLdRdSZMdTdUZNdVdWZOdXdYZPdZd[ZQdLedLd:d:fd\d]ZRd^d_ZSd`daZTdbdZUdcddZVddedZWdfdZXdgdZYddidZZdjdkZ[dldmZ\Gdndodoe]Z^Gdpdqdqe)Z_ej`drdsZadtd ZbGdudvdve]Zcddwd$ZddxdyZedS))absolute_import)dequeN)InstallationError)console_to_str
expanduserstdlib_pkgs)
site_packages	user_siterunning_under_virtualenvvirtualenv_no_globalwrite_delete_marker_filedistutils_scheme)
pkg_resources)input)PY2)retry)BytesIO)StringIOrmtreedisplay_path
backup_dirasksplitextformat_sizeis_installable_diris_svn_page
file_contentssplit_leading_dirhas_leading_dirnormalize_pathrenamesget_terminal_sizeget_prog
unzip_file
untar_fileunpack_filecall_subprocesscaptured_stdout
ensure_dirARCHIVE_EXTENSIONSSUPPORTED_EXTENSIONSget_installed_version.tar.bz2.tbz.tar.xz.txz.tlz.tar.lz	.tar.lzma.zip.whl.tar.gz.tgz.tarzbz2 module is not availablezlzma module is not availablecOs,yt|Stk
r&|||YnXdS)N)
__import__ImportError)Zpkg_or_module_stringZ
ExceptionTypeargskwargsr</usr/lib/python3.6/__init__.pyimport_or_raiseIsr>cCsDytj|Wn0tk
r>}z|jtjkr.WYdd}~XnXdS)z os.path.makedirs without EEXIST.N)osmakedirsOSErrorerrnoZEEXIST)pather<r<r=r(Ps
c
CsDy$tjjtjddkr"dtjSWntttfk
r>YnXdS)Nr__main__.py-cz	%s -m pipZpip)rErF)	r?rCbasenamesysargv
executableAttributeError	TypeError
IndexErrorr<r<r<r=r"Ysii)Zstop_max_delayZ
wait_fixedFcCstj||tddS)N)
ignore_errorsonerror)shutilrrmtree_errorhandler)dirrNr<r<r=rcscCs2tj|jtj@r,tj|tj||dSdS)zOn 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.N)r?statst_modeS_IREADchmodS_IWRITE)funcrCexc_infor<r<r=rQis
rQcCsttjjtjj|}tjddkrB|jtjd}|jtj	d}|j
tjtjjrpd|t
tjd}|S)zTGives the display value for a given path, making it relative to cwd
    if possible.rreplace.N)r?rCnormcaseabspathrHversion_infodecodegetfilesystemencodingencodegetdefaultencoding
startswithgetcwdseplen)rCr<r<r=rxs.bakcCs:d}|}x(tjj||r0|d7}|t|}q
W||S)z\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc))r?rCexistsstr)rRextn	extensionr<r<r=rscCs2x&tjjddjD]}||kr|SqWt||S)NZPIP_EXISTS_ACTION)r?environgetsplitr)messageoptionsactionr<r<r=ask_path_existssrvcCsZxTtjjdrtd|t|}|jj}||krNtd|dj|fq|SqWdS)z@Ask the message interactively, with the given possible responsesZPIP_NO_INPUTz7No input was expected ($PIP_NO_INPUT set); question: %sz<Your response (%r) was not one of the expected responses: %sz, N)	r?rprq	Exceptionrstriplowerprintjoin)rsrtZresponser<r<r=rscCsL|dkrd|ddS|d	kr,d|dS|dkr@d|dSd|SdS)
Niz%.1fMBg@@
z%ikBz%.1fkBz%ibytesi@Bi'r<)bytesr<r<r=rscCs2tjj|sdStjj|d}tjj|r.dSdS)z@Return True if `path` is a directory containing a setup.py file.Fzsetup.pyT)r?rCisdirr{isfile)rCZsetup_pyr<r<r=rscCstjd|otjd|tjS)zT
    Returns true if the page appears to be the index page of an svn repository
    z<title>[^<]*Revision \d+:z#Powered by (?:<a[^>]*?>)?Subversion)researchI)Zhtmlr<r<r=rsc	Cs$t|d}|jjdSQRXdS)Nrbzutf-8)openreadr`)filenamefpr<r<r=rsccs x|j|}|sP|VqWdS)z7Yield pieces of data from a file-like object until EOF.N)r)filesizechunkr<r<r=read_chunkss

rcCsh|jdjd}d|krHd|kr4|jd|jdks<d|krH|jddSd|kr\|jddS|dfSdS)N/\riro)lstripfindrr)rCr<r<r=rs$cCsDd}x:|D]2}t|\}}|s"dS|dkr0|}q
||kr
dSq
WdS)zyReturns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)NFT)r)pathsZ
common_prefixrCprefixrestr<r<r=rs
TcCs2t|}|rtjj|}ntjj|}tjj|S)zN
    Convert a path to its canonical, case-normalized, absolute version.

    )rr?rCrealpathr^r])rCZresolve_symlinksr<r<r=rs
cCs@tj|\}}|jjdr8|dd|}|dd}||fS)z,Like os.path.splitext, but take off .tar tooz.tarNr)	posixpathrryendswith)rCbaserlr<r<r=rs
cCs|tjj|\}}|r0|r0tjj|r0tj|tj||tjj|\}}|rx|rxytj|Wntk
rvYnXdS)z7Like os.renames(), but handles renaming across devices.N)	r?rCrrrjr@rPZmove
removedirsrA)oldnewheadtailr<r<r=r s
cCsts
dSt|jttjS)z
    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."

    T)r
rrdrHr)rCr<r<r=is_localsrcCstt|S)z
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    )r
dist_location)distr<r<r=
dist_is_local!srcCstt|}|jttS)zF
    Return True if given Distribution is installed in user site.
    )rrrdr	)r	norm_pathr<r<r=dist_in_usersite,srcCstt|jttS)ze
    Return True if given Distribution is installed in
    distutils.sysconfig.get_python_lib().
    )rrrdr)rr<r<r=dist_in_site_packages4s
rcCs,tt|}|jttddjddS)zf
    Return True if given Distribution is installed in
    path matching distutils_scheme layout.
    ropurelibpythonr)rrrdr
rr)rrr<r<r=dist_in_install_path>srcCs8x2tjD](}tjj||jd}tjj|rdSqWdS)z$Is distribution an editable install?z	.egg-linkTF)rHrCr?r{project_namer)rZ	path_itemegg_linkr<r<r=dist_is_editableHs
rcsl|r
tndd|r ddndd|r6ddndd|rHtnd	d
fddtjDS)
a
    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 stdlib_pkgs

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

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

    If ``user_only`` is True , only report installations in the user
    site directory.

    cSsdS)NTr<)dr<r<r=
local_testjsz/get_installed_distributions.<locals>.local_testcSsdS)NTr<)rr<r<r=
editable_testnsz2get_installed_distributions.<locals>.editable_testcSs
t|S)N)r)rr<r<r=rqscSst|S)N)r)rr<r<r=editables_only_testusz8get_installed_distributions.<locals>.editables_only_testcSsdS)NTr<)rr<r<r=rxscSsdS)NTr<)rr<r<r=	user_test~sz.get_installed_distributions.<locals>.user_testcs:g|]2}|r|jkr|r|r|r|qSr<)key).0r)rrrskiprr<r=
<listcomp>s
z/get_installed_distributions.<locals>.<listcomp>)rrrworking_set)Z
local_onlyrZinclude_editablesZeditables_onlyZ	user_onlyr<)rrrrrr=get_installed_distributionsQs

rcCsg}tr6tr|jtqN|jttrN|jtntrD|jt|jtx0|D](}tjj||jd}tjj	|rT|SqTWdS)a
    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.
    z	.egg-linkN)
r
rappendrr	r?rCr{rr)rZsitesZsiteZegglinkr<r<r=
egg_link_paths



rcCst|}|r|S|jS)z
    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.

    )rlocation)rrr<r<r=rsrc
Csdd}|dp|dp|d}|sZy(tjtjtj}||}tj|WnYnX|sztjjddtjjdd	f}t|dt|dfS)
zlReturns a tuple (x, y) representing the width(x) and the height(x)
    in characters of the terminal window.cSsPy4ddl}ddl}ddl}|jd|j||jd}Wn
dS|dkrLdS|S)NrZhhZ1234)rr)fcntltermiosstructunpackZioctlZ
TIOCGWINSZ)fdrrrcrr<r<r=ioctl_GWINSZsz'get_terminal_size.<locals>.ioctl_GWINSZrrirZZLINESZCOLUMNSP)r?rctermidO_RDONLYcloserprqint)rrrr<r<r=r!scCstjd}tj||S)zBGet the current umask which involves having to set it temporarily.r)r?umask)maskr<r<r=
current_umasks

rc
Cst|t|d}ztj|dd}t|jo0|}x|jD]}|j}|j|}|}	|rdt	|d}	t
jj||	}	t
jj
|	}
|	jds|	jdrt|	q<t|
t|	d}z|j|Wd|j|jd	?}|rtj|r|d
@rt
j|	dtd
BXq<WWd|jXdS)a
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    rT)Z
allowZip64rirrwbNIi)r(rzipfileZZipFilerZnamelistZinfolistrrrr?rCr{dirnamerwriterZ
external_attrrSS_ISREGrVr)
rrflattenZzipfpzipleadinginfonamedatafnrRrmoder<r<r=r#s0	




 c(Cs@t||jjds$|jjdr*d}nL|jjtr>d}n8|jjtrRd}n$|jjdrfd}ntjd|d	}tj||}zt	d
d|j
D}x|j
D]}|j}|dkrq|rt|d
}t
jj||}ytj|j|d|Wntjk
rYnX|jr"t|q|jrxy|j||Wn8tk
rt}ztjd||j|wWYdd}~XnXqy|j|}	Wn<ttfk
r}ztjd||j|wWYdd}~XnXtt
jj|t|d}
tj|	|
WdQRX|	j|j|||jd@rt
j |dt!dBqWWd|jXdS)a
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    z.gzz.tgzzr:gzzr:bz2zr:xzz.tarrz-Cannot determine compression type for file %szr:*cSsg|]}|jdkr|jqS)pax_global_header)r)rmemberr<r<r=r(szuntar_file.<locals>.<listcomp>rri)rz/In the tar file %s the member %s is invalid: %sNrri)"r(ryrBZ2_EXTENSIONS
XZ_EXTENSIONSloggerwarningtarfilerrZ
getmembersrrr?rCr{Zdata_filterr[ZLinkOutsideDestinationErrorr~ZissymZ_extract_memberrwZextractfileKeyErrorrKrrPZcopyfileobjrutimerrVr)rrrZtarrrrrCexcrZdestfpr<r<r=r$
sh	



cCstjj|}|dks,|jjts,tj|rDt|||jddn|dkslt	j
|sl|jjttt
rxt||nX|r|jdrtt|rddlm}|d|jj|ntjd	|||td
|dS)Nzapplication/zipz.whl)rzapplication/x-gzipz	text/htmlr)
Subversionzsvn+zZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz%Cannot determine archive format of %s)r?rCrryrZIP_EXTENSIONSrZ
is_zipfiler#rZ
is_tarfileTAR_EXTENSIONSrrr$rdrrZpip.vcs.subversionrZurlrrcriticalr)rrZcontent_typelinkrr<r<r=r%`s,


raisecCs,|r
d}ntj}|dkrng}xF|D]>}	d|	ksFd|	ksFd|	ksFd|	krVd|	jdd}	|j|	q"Wdj|}tjd|tjj	}
|r|
j
|ytj|tjd|||
d}Wn2t
k
r}ztjd	||WYdd}~XnX|dk	rNg}
x\t|jj}|sP|j}|
j|dtjtjkr:tj|q|dk	r|jqW|j|dk	r~|jrt|jd
n
|jd|jr|dkrtjtjkr|rtjd
|tjdj|
dtd||j|fn:|dkrtjd||j|n|dkrntdt||s(dj|
SdS)N 
"'z"%s"z\"zRunning command %s)stderrstdinstdoutcwdenvz#Error %s while executing command %serrordonerz Complete output from command %s:roz)
----------------------------------------z,Command "%s" failed with error code %s in %swarnz$Command "%s" had error code %s in %signorezInvalid value: on_returncode=%s)
subprocessPIPEr[rr{rdebugr?rpcopyupdatePopenZSTDOUTrwrrrreadlinerstripZgetEffectiveLevelstd_loggingDEBUGZspinwait
returncodeZfinishrrr
ValueErrorrepr)cmdZshow_stdoutrZ
on_returncodeZcommand_descZ
extra_environZspinnerrZ	cmd_partspartrprocrZ
all_outputliner<r<r=r&sz
 










cCsht|d}|j}WdQRXdtjddg}x4|D],}y|j|}Wntk
r\w4YnXPq4W|S)aRReturn the contents of *filename*.

    Try to decode the file contents with utf-8, the preferred system encoding
    (e.g., cp1252 on some Windows machines), and latin1, in that order.
    Decoding a byte string with latin1 will never raise an error. In the worst
    case, the returned string will contain some garbage characters.

    rNzutf-8Flatin1)rrlocalegetpreferredencodingr`UnicodeDecodeError)rrrZ	encodingsencr<r<r=read_text_files	
r
cCstj|t|dS)N)r?r@r)Z	build_dirr<r<r=_make_build_dirs
rc@s(eZdZdZddZddZddZdS)	FakeFilezQWrap a list of lines in an object with readline() to make
    ConfigParser happy.cCsdd|D|_dS)Ncss|]
}|VqdS)Nr<)rlr<r<r=	<genexpr>sz$FakeFile.__init__.<locals>.<genexpr>)_gen)selflinesr<r<r=__init__szFakeFile.__init__cCsDy*y
t|jStk
r&|jjSXWntk
r>dSXdS)Nro)nextr	NameError
StopIteration)rr<r<r=rs
zFakeFile.readlinecCs|jS)N)r)rr<r<r=__iter__szFakeFile.__iter__N)__name__
__module____qualname____doc__rrrr<r<r<r=rs	rc@s$eZdZeddZeddZdS)
StreamWrappercCs||_|S)N)orig_stream)clsrr<r<r=from_streamszStreamWrapper.from_streamcCs|jjS)N)rencoding)rr<r<r=r"szStreamWrapper.encodingN)rrrclassmethodr!propertyr"r<r<r<r=rsrc
cs@tt|}tt|tj|ztt|VWdtt||XdS)zReturn a context manager used by captured_stdout/stdin/stderr
    that temporarily replaces the sys stream *stream_name* with a StringIO.

    Taken from Lib/support/__init__.py in the CPython repo.
    N)getattrrHsetattrrr!)Zstream_nameZorig_stdoutr<r<r=captured_output s

r'cCstdS)zCapture the output of sys.stdout:

       with captured_stdout() as stdout:
           print('hello')
       self.assertEqual(stdout.getvalue(), 'hello
')

    Taken from Lib/support/__init__.py in the CPython repo.
    r)r'r<r<r<r=r'/s	c@s eZdZdZddZddZdS)cached_propertyzA property that is only computed once per instance and then replaces
       itself with an ordinary attribute. Deleting the attribute resets the
       property.

       Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175
    cCst|d|_||_dS)Nr)r%rrX)rrXr<r<r=rCszcached_property.__init__cCs(|dkr|S|j|}|j|jj<|S)N)rX__dict__r)robjr valuer<r<r=__get__Gszcached_property.__get__N)rrrrrr,r<r<r<r=r(;sr(cCs@tjj|}|dkrtj}n
tj|}|j|}|r<|jSdS)zCGet the installed version of dist_name avoiding pkg_resources cacheN)rZRequirementparseZ
WorkingSetrversion)Z	dist_nameZlookup_dirsZreqrrr<r<r=r+Os


cCst|dddS)zConsume an iterable at C speed.r)maxlenN)r)iteratorr<r<r=consumecsr1)r,r-)r.r/r0r1r2)r3r4)r5r6r7)F)rh)T)T)TNrNNN)N)fZ
__future__rcollectionsr
contextlibrBior	Zloggingrrr?rrPrSrrHrrZpip.exceptionsrZ
pip.compatrrrZ
pip.locationsrr	r
rrr
Zpip._vendorrZpip._vendor.six.movesrZpip._vendor.sixrZpip._vendor.retryingrrr__all__Z	getLoggerrrrrrrr)r*bz2r9rZlzmar>r(r"rrQrrrvrrrrrDEFAULT_BUFFER_SIZErrrrrr rrrrrrrrrr!rr#r$r%r&r
robjectrrcontextmanagerr'r'r(r+r1r<r<r<r=<module>s 
	



	

	

	5%
+S!
_