Ñò
œèRc           @   sí  d  Z  d d k Z d d k Z d d k Z d d k Z d d k l Z l Z d d k Z d d k	 l
 Z
 d d k Z e i i e i i e ƒ d ƒ Z d Z d Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z e ƒ  o4 e i i e i d ƒ Z e i i e i d ƒ Z nL e ƒ  Z y e i i e i ƒ  d ƒ Z Wn  e j
 o e i d ƒ n Xe i i e i i  e ƒ ƒ Z e i i e ƒ Z e
 ƒ  Z! e i i" d ƒ Z# e i$ d j oŠ e i i e i d ƒ Z% e i i& e% ƒ p e i i e i d ƒ Z% n e i i e# d ƒ Z' e i i e' d ƒ Z( e i i e' d ƒ Z) nŸ e i i e i d ƒ Z% e i i e# d ƒ Z' e i i e' d ƒ Z( e i i e' d ƒ Z) e i$ d  d j o3 e i d  d j o d Z% e i i e# d ƒ Z) n e* d d „ Z, d S(    s7   Locations where we look for configs, install stuff, etciÿÿÿÿN(   t   installt   SCHEME_KEYS(   t   get_python_libs
   cacert.pems¹   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).
s   pip-delete-this-directory.txtc         C   s?   t  i i |  t ƒ } t | d ƒ } | i t ƒ | i ƒ  d S(   s?   
    Write the pip delete marker file into this directory.
    t   wN(   t   ost   patht   joint   PIP_DELETE_MARKER_FILENAMEt   opent   writet   DELETE_MARKER_MESSAGEt   close(   t	   directoryt   filepatht	   marker_fp(    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   write_delete_marker_file   s    c           C   s   t  t d ƒ S(   sM   
    Return True if we're running inside a virtualenv, False otherwise.

    t   real_prefix(   t   hasattrt   sys(    (    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   running_under_virtualenv!   s    c          C   s\   t  i i t  i i t i ƒ ƒ }  t  i i |  d ƒ } t ƒ  o t  i i | ƒ o t	 Sd S(   s?   
    Return True if in a venv and no system site packages.
    s   no-global-site-packages.txtN(
   R   R   t   dirnamet   abspatht   sitet   __file__R   R   t   isfilet   True(   t   site_mod_dirt   no_global_file(    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   virtualenv_no_global)   s    !c          C   s=   t  i d j o t i ƒ  Sd d k }  |  i t i ƒ  ƒ i S(   s8    Returns the effective username of the current process. t   win32iÿÿÿÿN(	   R   t   platformt   getpasst   getusert   pwdt   getpwuidR   t   geteuidt   pw_name(   R!   (    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   __get_username3   s    c          C   s  t  i i t i ƒ  d t ƒ  ƒ }  t i d j o |  Sy t  i |  ƒ t	 |  ƒ Wnµ t
 j
 o© d } y? t  i |  t  i t  i Bƒ } t  i | ƒ i } t  i | ƒ Wn t
 j
 o d } n X| t  i ƒ  j o. d |  } | GHd d GHt i i | ƒ ‚ q
n X|  S(   s    Returns a safe build_prefix s   pip_build_%sR   sA   The temporary folder for building (%s) is not owned by your user!s0   pip will not work until the temporary folder is s-   either deleted or owned by your user account.N(   R   R   R   t   tempfilet
   gettempdirR%   R   R   t   mkdirR   t   OSErrort   NoneR   t   O_RDONLYt
   O_NOFOLLOWt   fstatt   st_uidR   R#   t   pipt
   exceptionst   InstallationError(   R   t   file_uidt   fdt   msg(    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   _get_build_prefix:   s.    t   buildt   srcs=   The folder you are executing pip from can no longer be found.t   ~R   t   Scriptst   binR/   s   pip.inis   pip.logs   .pips   pip.confi   t   darwini   s   /System/Library/s   /usr/local/bins   Library/Logs/pip.logc      
   C   sÙ   d d k  l } h  } | h |  d 6ƒ } t | ƒ } | p | i | _ | p | i | _ | i ƒ  x% t D] } t | d | ƒ | | <ql Wt | d <t	 ƒ  o4 t
 i i t i d d d t i d	  |  ƒ | d
 <n | S(   s+   
    Return a distutils install scheme
    iÿÿÿÿ(   t   Distributiont   namet   install_t   scriptst   includeR   t   pythoni   t   headers(   t   distutils.distR<   R    t   usert   homet   finalize_optionsR   t   getattrt   bin_pyR   R   R   R   R   t   prefixt   version(   t	   dist_nameRD   RE   R<   t   schemet   dt   it   key(    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   distutils_schemeƒ   s$    
 

(-   t   __doc__R   R   R   R&   t   distutils.command.installR    R   R   t   pip.backwardcompatR   t   pip.exceptionsR/   R   R   R   R   t   default_cert_pathR
   R   R   R   R   R%   R5   RI   t   build_prefixt
   src_prefixt   getcwdR)   t   exitR   t   realpatht   site_packagest
   expandusert   user_dirR   RH   t   existst   default_storage_dirt   default_config_filet   default_log_filet   FalseR*   RP   (    (    (    sI   /var/www/html/kasc-wg8/erics/lib/python2.6/site-packages/pip/locations.pyt   <module>   sV   !	
		
		
		(