ž 7’Re:c@sRdZddlZddlZddlZddlZddlmZmZddlZddl m Z m Z m Z ddl ZdZdZdd„Zd d „Zd d „Zd d„Zdd„ZeƒrejjejdƒZejjejdƒZnJeƒZyejjejƒdƒZWnek rMejdƒYnXejjejjeƒƒZejjeƒZe ƒZ ejj!dƒZ"ej#dkrqejjejdƒZ$e rΫejje dƒndZ&ejj'e$ƒs/ejjejdƒZ$e r&ejje dƒndZ&nejje"dƒZ(ejje(dƒZ)ejje(dƒZ*nΘejjejdƒZ$e r€ejje dƒndZ&ejje"dƒZ(ejje(dƒZ)ejje(dƒZ*ej#dd…dkr9ejdd…d kr9d!Z$ejje"d"ƒZ*nd%ddd#d$„Z,dS(&u7Locations where we look for configs, install stuff, etciN(uinstallu SCHEME_KEYS(uget_python_libu get_path_uidu user_siteuΉThis file is placed here by pip to indicate the source was put here by pip. Once this package is successfully installed this source code will be deleted (unless you remove this file). upip-delete-this-directory.txtcCs?tjj|tƒ}t|dƒ}|jtƒ|jƒdS(u? Write the pip delete marker file into this directory. uwN(uosupathujoinuPIP_DELETE_MARKER_FILENAMEuopenuwriteuDELETE_MARKER_MESSAGEuclose(u directoryufilepathu marker_fp((u&/tmp/pip-zej_zi-build/pip/locations.pyuwrite_delete_marker_files uwrite_delete_marker_filecCs9ttdƒrdStjttdtjƒkr5dSdS(uM Return True if we're running inside a virtualenv, False otherwise. u real_prefixu base_prefixTF(uhasattrusysuTrueuprefixugetattruFalse(((u&/tmp/pip-zej_zi-build/pip/locations.pyurunning_under_virtualenv s urunning_under_virtualenvcCsYtjjtjjtjƒƒ}tjj|dƒ}tƒrUtjj|ƒrUdSdS(u? Return True if in a venv and no system site packages. uno-global-site-packages.txtNT( uosupathudirnameuabspathusiteu__file__ujoinurunning_under_virtualenvuisfileuTrue(u site_mod_diruno_global_file((u&/tmp/pip-zej_zi-build/pip/locations.pyuvirtualenv_no_global-s!uvirtualenv_no_globalcCs;tjdkrtjƒSddl}|jtjƒƒjS(u8 Returns the effective username of the current process. uwin32iN( usysuplatformugetpassugetuserupwdugetpwuiduosugeteuidupw_name(upwd((u&/tmp/pip-zej_zi-build/pip/locations.pyu__get_username7s  u__get_usernamecCsγtjjtjƒdtƒƒ}tjdkr5|Sytj|ƒt |ƒWnŒt k rήd}yt |ƒ}Wnt k rd}YnX|tj ƒkrΪd|}t|ƒtddƒtjj|ƒ‚nYnX|S(u Returns a safe build_prefix u pip_build_%suwin32uSThe temporary folder for building (%s) is either not owned by you, or is a symlink.u0pip will not work until the temporary folder is uAeither deleted or is a real directory owned by your user account.N(uosupathujoinutempfileu gettempdiru__get_usernameusysuplatformumkdiruwrite_delete_marker_fileuOSErroruNoneu get_path_uidugeteuiduprintupipu exceptionsuInstallationError(upathufile_uidumsg((u&/tmp/pip-zej_zi-build/pip/locations.pyu_get_build_prefix>s*      u_get_build_prefixubuildusrcu=The folder you are executing pip from can no longer be found.u~uwin32uScriptsubinupipupip.iniupip.logu.pipupip.confiudarwiniu/System/Library/u/usr/local/binuLibrary/Logs/pip.logc Cs8ddlm}i}|i|d6ƒ}|jƒ|jdddƒ}|pT|j|_|pf|j|_|px|j|_|jƒx%t D]}t |d|ƒ||sZ            !$!2