9Tc@@s|ddklZddkZddkZddkZddkZddkZddkZddkZddk Z ddk l Z ddk l Z ddklZddklZlZddklZddklZdd klZddkZdd klZlZdd k l!Z!l"Z"l#Z#l$Z$dd k%l&Z&l'Z'l(Z(dd k)l*Z*l+Z+l,Z,l-Z-ddk.l/Z/l0Z0l1Z1l2Z2l3Z3l4Z4l5Z5l6Z6l7Z7l8Z8l9Z9l:Z:l;Z;ddk<l=Z=ddk>l?Z?ddk@lAZAddkBlCZCddklDZDlEZElFZFddkGlHZHeiIeJZKdeLfdYZMdZNdZOdZPeQdZRdS(i(tabsolute_importN(t change_root(t sysconfig(t FeedParser(t pkg_resourcestsix(t interpret(t configparser(tparse(t native_strtWINDOWS(tis_urlt url_to_patht path_to_urltis_archive_file(tInstallationErrortUninstallationErrortUnsupportedWheel(tbin_pytrunning_under_virtualenvtPIP_DELETE_MARKER_FILENAMEtbin_user( t display_pathtrmtreetask_path_existst backup_dirtis_installable_dirtdist_in_usersitetdist_in_site_packagest egg_link_pathtmake_path_relativetcall_subprocesstread_text_filetFakeFilet_make_build_dir(tRemovedInPip8Warning(t indent_log(tUninstallPathSet(tvcs(tmove_wheel_filestWheelt wheel_ext(tVersiontInstallRequirementc B@seZd"ed"eed"ed"ed Zed"d"edZed"edZdZ e dZ dZ dZ dZe dZe d Ze d Zd Zd Zd ZdZdZeidZe dZdZedZedZdZdZdZ dZ!dZ"d#d"dZ#dZ$d$dZ%dZ&dZ'e dZ(d"d Z)d!Z*RS(%c C@sd|_t|tio"tii|}|i|_n||_||_||_ ||_ |djo h}n||_ ||_ ||_| |_d|_d|_d|_d|_||_d|_d|_t|_d|_| |_| |_dS(N((textrast isinstanceRt string_typesRt RequirementRtreqt comes_fromt source_dirteditabletNoneteditable_optionsturltas_eggtmarkerst_egg_info_patht satisfied_bytconflicts_witht_temp_build_dirtupdatetinstall_succeededt uninstalledtFalset use_user_sitet target_dirt pycompiletisolated( tselfR0R1R2R3R6R7R=R5RCR8RD((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt__init__1s2                     c C@st||\}}}}|idot|} nd} |||d| dtd|d|d|} |dj o || _n| S(Nsfile:R2R3R6R5RD(tparse_editablet startswithR R4tTrueR,( tclst editable_reqR1t default_vcsRDtnameR6textras_overrideR5R2tres((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt from_editableZs   c C@svddkl}d}t|o d}nd}||jo9|i|d\}}|i}|p d}qnd}|i}d}tiitii |} d} t|o||} ntii | oZtii |jp|i do7t | ptd|n|t|} nKt| o=tii| ptid|n|t|} n| o| i}| id jo>tid |o+ttiitii | i}n| itjoMt| i} | iptd | ind | i| if}qW| i }n|}|||d |d|d|S(sCreates an InstallRequirement from a name, which might be a requirement, directory containing 'setup.py', filename, or URL. i(tLinks; t;it.s;Directory %r is not installable. File 'setup.py' not found.sARequirement %r looks like a filename, but the file does not existtfiles\.\./s-%s is not a supported wheel on this platform.s%s==%sR6R8RDN(!t pip.indexRQR4R tsplittstriptostpathtnormpathtabspathtisdirtsepRHRRR RtisfiletloggertwarningR6tschemetretsearchtextR)R(tfilenamet supportedRRMtversiont egg_fragment( RJRMR1RDRQR6t marker_sepR8R0RYtlinktwheel((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt from_lineosZ      #    #+  cC@s|io2t|i}|io|d|i7}qEn |i}|idj o|dt|ii7}n|ioOt|it i o |i}n|ii }|o|d|7}qn|S(Ns from %ss in %ss (from %s)( R0tstrR6R:R4RtlocationR1R-RR.t from_path(REtsR1((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt__str__s     cC@s |iiS(N(R0t specifier(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRrscC@s|idjodSt|i}|ioOt|itio |i}n|ii}|o|d|7}q}n|S(Ns->(R0R4RmR1R-RR.Ro(RERpR1((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRos  cC@s|idj o|iS|idjo&tidd|_||_|iS|io|ii}n |i}t i i |pt |nt i i ||S(Ns-buildspip-(R<R4R0ttempfiletmkdtempt_ideal_build_dirR3RMtlowerRXRYtexistsR"tjoin(REt build_dirRM((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytbuild_locations   cC@s?|idj odS|idj pt|ipt|i}|i}|`|io|ii}n |i}t i i ||}t i i |pt id|t|nt i i |otdt|nt id|t|t|ti||||_||_d|_dS(skIf the build location was a temporary directory, this will move it to a new more permanent locationNsCreating directory %ss<A package already exists in %s; please remove it to continues,Moving package %s from %s to new location %s(R2R4R0tAssertionErrorR<RuR3RMRvRXRYRxRwR_tdebugR"RRtshutiltmoveR9(REt old_locationt new_build_dirRMt new_location((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytcorrect_build_locations2      cC@s%|idjodSt|iiS(N(R0R4R t project_name(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRM scC@s.|idjodSti|iiiS(N(R0R4t urllib_parsetquoteRRv(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyturl_namescC@syddk}Wntj otdnXd}|io6d|ijo&tii|i|id|}ntii|i|}ti o,t |ti o|i t i}n|S(NisBsetuptools must be installed to install from a source distributionssetup.pyt subdirectory(t setuptoolst ImportErrorRR5RXRYRxR2RtPY2R-t text_typetencodetsystgetfilesystemencoding(RERt setup_filetsetup_py((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRs  cC@s|ipt|iotid|i|intid|i|itii z|idjoFt i i t i i |id o tt i i |idn|i}|idt|i}|idt|i}tid|g}|io|d g7}n|d g}|io g}nIt i i |id }t i i|pt i|nd d g}|i}|io0d |ijo t i i ||id }nt||d|d|idtdtiddWdQX|ip|tt i!|i"dt#o d}nd}t i$i%di |i"d||i"dg|_|i&ndS(Ns2Running setup.py (path:%s) egg_info for package %ss7Running setup.py (path:%s) egg_info for package from %st distributeRsdistribute.egg-infot __SETUP_PY__t __PKG_NAME__s-cs --no-user-cfgtegg_infos pip-egg-infos --egg-baseRtcwdt filter_stdoutt show_stdoutt command_levelt command_descspython setup.py egg_infoR*s==s===ttName('R2R{RMR_R|RR6R$t__exit__t __enter__RXRYR\RxRt _run_setup_pytreplacetreprRt executableRDR3RwtmakedirsR5Rt_filter_installR@tloggingtDEBUGR0R-Rt parse_versiontpkg_infoR*R/RR(REtscripttbase_cmdt egg_info_cmdtegg_base_optiont egg_info_dirRtop((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt run_egg_info1sb                     s __file__ = __SETUP_PY__ from setuptools.command import egg_info import pkg_resources import os import tokenize def replacement_run(self): self.mkpath(self.egg_info) installer = self.distribution.fetch_build_egg for ep in pkg_resources.iter_entry_points('egg_info.writers'): # require=False is the change we're making: writer = ep.load(require=False) if writer: writer(self, ep.name, os.path.join(self.egg_info,ep.name)) self.find_sources() egg_info.egg_info.run = replacement_run exec(compile( getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec' )) cC@s|idj o)|ii|pdS|ii|S|ipt|i|}tii |pdSt |}|S(N( R:R4t has_metadatat get_metadataR2R{t egg_info_pathRXRYRwR (RERetdata((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt egg_info_datas c C@sb|idjo<|io |i}ntii|id}ti|}|iong}x,ti|D]\}}}x/t i D]$}||jo|i |qqWxt |D]}tii tii||ddp(tii tii||ddo|i |q|djp |djo|i |qqW|ig}|D]}|tii||qc~qnWg} |D]!} | ido | | qq~ }n|ptd ||fn|ptd ||ft|d jo|id d ntii||d |_ntii|i|S(Ns pip-egg-infotbintpythontScriptss Python.exettestttestss .egg-infos$No files/directories in %s (from %s)itkeycS@s:|itiitiio|itiipdS(i(tcountRXRYR]taltsep(tx((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytsi(R9R4R3R2RXRYRxtlistdirtwalkR&tdirnamestremovetlistRwtextendtendswithRR{tlentsort( RERetbaset filenamestroottdirstfilestdirt_[1]t_[2]tf((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRsH          .9   cC@s`t}|id}|p#tidt|idn|i|pd|iS(NsPKG-INFOsNo PKG-INFO file found in %sR(RRR_R`RRtfeedtclose(REtpR((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRs s \[(.*?)\]cC@sCtii|i}ti}|i|}|o|iSdS(N(RR/RRMt WorkingSettfindRg(RER0t working_settdist((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytinstalled_versions  cC@sn|ipt|id}||ijotid||in tidt|i||dS(NRgs'Requested %s, but installing version %ss;Source in %s has version %s, which satisfies requirement %s( R2R{RR0R_R`RR|R(RERg((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytassert_source_matches_versions cC@s|iptid|idS|ipt|ipt|iidodSd|ijptd|i|ipdS|iidd\}}t i |}|o>||i}|o|i |iq|i |indptd|i|fdS(Ns>Cannot update repository at %s; repository location is unknownsfile:t+s bad url: %riis+Unexpected version control type (in %s): %s( R6R_R|R2R3R{RHR=RVR&t get_backendtobtaintexport(RERtvc_typeR6tbackendt vcs_backend((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytupdate_editables,  !  c C@s|iptd|ifn|ip|i}t|}t|}|ioti i |i}t |i dd}|ot|dii}z+|~}ti i|ii} WdQX| |ijptd| |i|if|i|ti iti i|d} |i| |inu|oc|iidoP|i|i|idoUx)|idiD]7} ti iti i|i| } |i| qWq|id o|id o|id } ng} xg}|id iD]%}|o|| jo ||q.q.~D]M}ti i|i|} |i| |i| d |i| d qZWqn |o-ti d i!|it"|i|n|iidoe|i|iti i#|id}ti iti i|id} |i| d|n_|oA|iido.xAt$i%i&|D]} |i| qWnt'i(d||i|ido|i)dox|i*dD]j}t+|o t,}nt-}|iti i||t.o$|iti i||dqqWn|idot/i0}|i1t2|i3d|i4dox|i5dD]\}}t+|o t,}nt-}|iti i||t.od|iti i||d|iti i||d|iti i||dqqWqsn|i6|||_7dS(s Uninstall the distribution currently satisfying this requirement. Prompts before removing or modifying files unless ``auto_confirm`` is True. Refuses to delete or modify files outside of ``sys.prefix`` - thus uninstallation within a virtual environment can only modify that virtual environment, even if the virtualenv is linked to global site-packages. s.Cannot uninstall requirement %s, not installedRYtrNs;Egg-link %s does not match installed location of %s (at %s)seasy-install.pths .egg-infosinstalled-files.txts top_level.txtsnamespace_packages.txts.pys.pycsUninstalling a distutils installed project ({0}) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.s.eggis./s .dist-infos)Not sure how to uninstall: %s - Check: %stscriptss.batsentry_points.txttconsole_scriptss.exes .exe.manifests -script.py(8tcheck_if_existsRRMR:R;R%RRRXRYRwtgetattrt _providerR4topenRRtnormcasetreadlineRWRnR{taddRxtdirnametadd_pthRRRt splitlinesRZtwarningstwarntformatR#RVtpipRktuninstallation_pathsR_R|tmetadata_isdirtmetadata_listdirRRRR RtSafeConfigParsertreadfpR!tget_metadata_linest has_sectiontitemsRR?(REt auto_confirmRtpaths_to_removetdevelop_egg_linktegg_info_existstdistutils_egg_infoRtfht link_pointerteasy_install_pthtinstalled_fileRYt namespacesRRt top_level_pkgteasy_install_eggRtbin_dirtconfigRMtvalue((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt uninstalls   &$     &       ,    * cC@s2|io|iintid|idS(Ns'Can't rollback %s, nothing uninstalled.(R?trollbackR_terrorR(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytrollback_uninstalls cC@s2|io|iintid|idS(Ns%Can't commit %s, nothing uninstalled.(R?tcommitR_R R(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytcommit_uninstalls cC@s|iptt}d|i|idf}tii||}tii|ot dt |d}|djo t }q|djo't i dt |ti|q|djo?t|}t i dt |t |ti||qn|ozti|dtid t}tiitii|i}xti|D]\} } } d | jo| id nxl| D]d} tii| | } |i| |} ti|id | d }d|_|i|dqWxd| D]\}|tjoq ntii| |}|i||} |i||id | q WqfW|it idt |ndS(Ns %s-%s.zipRgs/The file %s exists. (i)gnore, (w)ipe, (b)ackup titwtbs Deleting %ssBacking up %s to %st allowZip64s pip-egg-infot/iiRsSaved %s(RRRi( R2R{RIRMRRXRYRxRwRRR@R_R`RRR}R~tzipfiletZipFilet ZIP_DEFLATEDRR[Rt_clean_zip_nametZipInfot external_attrtwritestrRtwriteRtinfo(RERytcreate_archivet archive_namet archive_pathtresponset dest_filetzipRtdirpathRRRRMtzipdirRe((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytarchivesZ        !   # cC@s^|i|tiiptd||f|t|d}|itiid}|S(Ns$name %r doesn't start with prefix %riR(RHRXRYR]R{RR(RERMtprefix((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRs cC@s&|idj ot|iStSdS(N(R8R4tmarkers_interpretRI(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt match_markerssc@s|io|i||dS|ioOtii|i}tii||i|i |idt |_ dS|i ot |dg}ntidd}tii|d}ztig}|id|id|i|t |dd |g7}|ip|d g7}ndj o|d g7}n|io|d g7}n|d g7}to<dti}|dtiitidd|g7}ntid|it i!i"z*t#||d|id|i$dt%WdQXtii&|pti'd|dSt |_ |iodSfd} t(|i!i"} ze| ~ } xU| D]9} tii)| } | i*do| | }PqqWti+d|dSWdQXg}t(|i!i"}zm|~} x]| D]U} | i,}tii-|o|tii.7}n|it/| ||q WWdQXtii|d}t(|di!i"}z'|~} | i0di|dWdQXWdtii&|oti1|nt2|XdS(NRs --no-user-cfgs-recordspip-sinstall-record.txts-csimport setuptools, tokenize;__file__=%r;exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))tinstalls--records#--single-version-externally-manageds--roots --compiles --no-compileRs--install-headerstincludetsitesRunning setup.py install for %sRRRsRecord file %s not foundc@s7djptii| o|St|SdS(N(R4RXRYtisabsR(RY(R(s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt prepend_root+s!s .egg-infos;Could not find .egg-info directory in install record for %ssinstalled-files.txtRs (3R3tinstall_editabletis_wheelRRkt wheel_versionR2tcheck_compatibilityRMR'RIR>RDRRsRtRXRYRxRRtappendRR7R4RCRRtget_python_versionR&R_RR$RRRRR@RwR|RRRR`RWR\R]RRRR(REtinstall_optionstglobal_optionsRRgt temp_locationtrecord_filenamet install_argst py_ver_strR-RRtlinet directoryRt new_linesRRetinst_files_patht_[3]((Rs9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR)s                   #   # &$cC@s|ioItiitii|ito$tid|it|ind|_|i o'tii|i ot|i nd|_ dS(sVRemove the source files from this requirement, if they are marked for deletionsRemoving source in %sN( R2RXRYRwRxRR_R|RR4R<(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytremove_temporary_sourceRs  c C@stid|i|iot|dg}ntiiz|i}|i o0d|i jo t i i ||i d}nt tidd|igt|ddgt|d|d |id tWdQXt|_dS( NsRunning setup.py develop for %ss --no-user-cfgRs-csimport setuptools, tokenize; __file__=%r; exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))tdevelops --no-depsRRR(R_RRMRDRR$RRR2R5RXRYRxRRRRRR@RIR>(RER4R5R((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR.^s     7 c C@szti}xdddddddddd d d d d g D]5}| pti||ioti}Pq7q7W||fS(Ns ^running .*s ^writing .*s ^creating .*s^[Cc]opying .*s ^reading .*s4^removing .*\.egg-info' \(and everything under it\)$s^byte-compiling s ^SyntaxError:s^SyntaxWarning:s^\s*Skipping implicit fixer: s;^\s*(warning: )?no previously-included (files|directories) s+^\s*warning: no files found matching \'.*\'s7^warning: manifest_maker: standard file '-c' not found$(RtINFORbRcRWR(RER:tleveltregex((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR{s( !  cC@s|idjotSyN|iidjo"|io|iidjotSti|i|_Wnti j otSti j oti|ii}|i oUt |o ||_q t o-t|o td|i|ifq q||_nXtS(sFind an installed distribution that satisfies or conflicts with this requirement, and set self.satisfied_by or self.conflicts_with appropriately.RRsVWill not install to the user site because it will lack sys.path precedence to %s in %sN(R0R4R@RR;RIRtget_distributionR:tDistributionNotFoundtVersionConflictRARRRRRn(REt existing_dist((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRs.      cC@s|io d|ijS(Ns.whl(R6(RE((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR/scC@sDt|i|i|d|id|id|d|id|idS(NtuserthomeRRCRD(R'RMR0RARBRCRD(REtwheeldirR((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR's   cC@sz|id}tii|}ti||}tiitii|d}titii|d|d|S(sAReturn a pkg_resources.Distribution built from self.egg_info_pathRiRtmetadata( RRXRYRRt PathMetadatatsplitexttbasenamet Distribution(RERtbase_dirRKt dist_name((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytget_dists"N(((+t__name__t __module__R4R@RIRFt classmethodRPRlRqtpropertyRrRoRzRRMRRRRRRRRbtcompilet_requirements_section_reRRRR R RR%RR(R)R?R.RRR/R'RR(((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyR+/sN 'G    ] 6      .  h   ' cC@s0tid|}|o|id}n|S(s2 Strip req postfix ( -dev, 0.2, etc ) s^(.*?)(?:-dev|-\d.*)$i(RbRctgroup(R0tmatch((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt_strip_postfixscC@sg}|idddidD]}|o ||q$q$~}d}|dd jo|d }n |d d jo|d}n|S(Nt#iiRittagstbranchesttagtbranchiittrunk(R]R^R_sbranch(RVR4(R6RRtpartsR0((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt_build_req_from_urlsEcC@stid}|i|}|oVt}xE|D]=}|\}}||jotd|n|||[^&=]+)=(?P[^&=]+)s%s option already definedN(RbRWtfindalltdictt ExceptionR4(R0tregexptmatchedtrettoptionRMR((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyt_build_editable_optionss   c C@s|}d}tid|}|o"|id}|id}n|}tii|oFtiitii|dpt d|nt |}n|i i do?|o$d|t iid|ihfSd|dhfSnx=tD]5}|i i d|od ||f}PqqWd |jo-|o|d |}qut d |n|id dd i }ti|pPd |dig}tiD]} || idq~d} t | nyt|} Wn+tj o} t d|| fnX| p d| jo+t|} | pt d|qyn | d} t| }||d| fS(sParses an editable requirement into: - a requirement name - an URL - extras - editable options Accepted requirements: svn+http://blahblah@rev#egg=Foobar[baz]&subdirectory=version_subdir .[some_extra] s^(.+)(\[[^\]]+\])$iissetup.pys;Directory %r is not installable. File 'setup.py' not found.sfile:t__placeholder__s%s:s%s+%sRsb%s should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+isFor --editable=%s only s, s+URLs is currently supporteds*--editable=%s error in editable options:%steggs@--editable=%s is not the right format; it must have #egg=PackageN(R4RbRZRYRXRYR\RwRxRR RvRHRR/RR,R&RVRtbackendsRMRkRfRcR[(RKRLR6R,tmt url_no_extrastversion_controlRRRt error_messagetoptionstexcR0tpackage((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pyRGsf "    9   (St __future__RRRXRbR}RRsRRtdistutils.utilRt distutilsRt email.parserRt pip._vendorRRtpip._vendor.distlib.markersRR'tpip._vendor.six.movesRtpip._vendor.six.moves.urllibRRt pip.wheelRt pip.compatR R t pip.downloadR R R Rtpip.exceptionsRRRt pip.locationsRRRRt pip.utilsRRRRRRRRRRR R!R"tpip.utils.deprecationR#tpip.utils.loggingR$tpip.req.req_uninstallR%tpip.vcsR&R'R(R)tpip._vendor.packaging.versionR*t getLoggerRSR_tobjectR+R[RcRkR4RG(((s9/usr/lib/python2.6/vendor-packages/pip/req/req_install.pytsH         ""X