๓ 9ีาTc@@s๏ddlmZddlZddlZddlZddlZddlZddlmZm Z ddl m Z ddl m Z mZmZmZmZmZddlmZejeƒZdefd„ƒYZd efd „ƒYZdS( i(tabsolute_importN(t uses_pycachetWINDOWS(tUninstallationError(trmtreetasktis_localt dist_is_localtrenamestnormalize_path(t indent_logtUninstallPathSetcB@skeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z e d„Z d „Z d „Z RS( sMA set of file paths to be removed in the uninstallation of a requirement.cC@s@tƒ|_tƒ|_i|_||_d|_g|_dS(N(tsettpathst_refusetpthtdisttNonetsave_dirt _moved_paths(tselfR((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyt__init__s      cC@s t|ƒS(ss Return True if the given path is one we are permitted to remove/modify, False otherwise. (R(Rtpath((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyt _permittedscC@sBt|jƒs>tjd|jjt|jjƒtjƒt St S(Ns1Not uninstalling %s at %s, outside environment %s( RRtloggertinfot project_nameR tlocationtsystprefixtFalsetTrue(R((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyt_can_uninstall&s  cC@s“t|ƒ}tjj|ƒs"dS|j|ƒrD|jj|ƒn|jj|ƒtjj|ƒddkrt r|jt j |ƒƒndS(Nis.py( R tosRtexistsRR taddRtsplitextRtimptcache_from_source(RR((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyR#1s "cC@skt|ƒ}|j|ƒrW||jkr@t|ƒ|j|ธss s sRemoving entry: %ssutf-8twb( RR?RNtopent readlinesRPR.RORBtencodet ValueErrort writelines(RtfhtlinestendlineR)((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyRBฒs   cC@sh|jdkr&tjd|jƒtStjd|jƒt|jdƒ}|j|jƒWdQXt S(Ns.Cannot roll back changes to %s, none were mades!Rolling %s back to previous stateRW( RPRRRFRNRR?RXR\R(RR]((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyRGลs (RJRKRR#RBRG(((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyR'žs (t __future__RR%tloggingR!RR=t pip.compatRRtpip.exceptionsRt pip.utilsRRRRRR tpip.utils.loggingR t getLoggerRJRtobjectR R'(((s;/usr/lib/python2.7/vendor-packages/pip/req/req_uninstall.pyts     .‹