ó
€
\c           @   sŸ  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l Z	 e j
 j e j
 j e ƒ d ƒ Z d „  Z d „  Z d „  Z e ƒ  rÖ e j
 j e j d ƒ Z e j
 j e j d	 ƒ Z nI e ƒ  Z y e j
 j e j ƒ  d	 ƒ Z Wn e k
 re j d
 ƒ n Xe j
 j e j
 j e ƒ ƒ Z e j
 j e ƒ Z e ƒ  Z e j
 j d ƒ Z e j d k r e j
 j e j d ƒ Z e j
 j e ƒ s¾e j
 j e j d ƒ Z n  e j
 j e d ƒ Z  e j
 j e  d ƒ Z! e j
 j e  d ƒ Z" n› e j
 j e j d ƒ Z e j
 j e d ƒ Z  e j
 j e  d ƒ Z! e j
 j e  d ƒ Z" e j d  d k r›e j d  d k r›d Z e j
 j e d ƒ Z" n  d S(   s7   Locations where we look for configs, install stuff, etciÿÿÿÿN(   t   get_python_libs
   cacert.pemc           C   s   t  t d ƒ S(   sM   
    Return True if we're running inside a virtualenv, False otherwise.

    t   real_prefix(   t   hasattrt   sys(    (    (    sT   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/locations.pyt   running_under_virtualenv   s    c          C   sY   t  j j t  j j t j ƒ ƒ }  t  j j |  d ƒ } t ƒ  rU t  j j | ƒ rU t	 Sd S(   s?   
    Return True if in a venv and no system site packages.
    s   no-global-site-packages.txtN(
   t   ost   patht   dirnamet   abspatht   sitet   __file__t   joinR   t   isfilet   True(   t   site_mod_dirt   no_global_file(    (    sT   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/locations.pyt   virtualenv_no_global   s    !c          C   sÿ   t  j j t j ƒ  d t j ƒ  ƒ }  t j d k r8 |  Sy t  j	 |  ƒ Wn¯ t
 k
 rú d } y? t  j |  t  j t  j Bƒ } t  j | ƒ j } t  j | ƒ Wn t
 k
 r· d } n X| t  j ƒ  k rû d |  } | GHd d GHt j j | ƒ ‚ qû n X|  S(   s    Returns a safe build_prefix s   pip-build-%st   win32sA   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
   gettempdirt   getpasst   getuserR   t   platformt   mkdirt   OSErrort   Nonet   opent   O_RDONLYt
   O_NOFOLLOWt   fstatt   st_uidt   closet   getuidt   pipt
   exceptionst   InstallationError(   R   t   file_uidt   fdt   msg(    (    sT   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/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.log(#   t   __doc__R   R	   R   R   R   t   pip.backwardcompatR    t   pip.exceptionsR!   R   R   R   R
   t   default_cert_pathR   R   R'   t   prefixt   build_prefixt
   src_prefixt   getcwdR   t   exitR   t   realpatht   site_packagest
   expandusert   user_dirR   t   bin_pyt   existst   default_storage_dirt   default_config_filet   default_log_file(    (    (    sT   /data/av2000/b2b/venv/lib/python2.7/site-packages/pip-1.3-py2.7.egg/pip/locations.pyt   <module>   sJ   !		
				&