File: //usr/lib/python2.7/ensurepip/__init__.pyc
�
�I	ec           @  s�   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d d g Z	 d �  Z
 d d g Z d d � Z
 d	 �  Z d
 �  Z d e e e e d d � Z d e e e e d d
 � Z d d � Z d d � Z d S(   i����(   t   print_functionNt   versiont	   bootstrapc           C  s$   t  r  t d � t j d � n  d  S(   Ns�  ensurepip is disabled in Debian/Ubuntu for the system python.
Python modules For the system python are usually handled by dpkg and apt-get.
    apt-get install python-<module name>
Install the python-pip package to use pip itself.  Using pip together
with the system python might have unexpected results for any system installed
module, so use it on your own risk, or make sure to only use it in virtual
environments.
i   (   t   Truet   printt   syst   exit(    (    (    s(   /usr/lib/python2.7/ensurepip/__init__.pyt    _ensurepip_is_disabled_in_debian   s    t
   setuptoolst   pipc         C  s;   | d  k	 r | t j t _ n  d d  l } | j j |  � S(   Ni����(   t   NoneR   t   patht
   pip._internalt	   _internalt   main(   t   argst   additional_pathsR	   (    (    s(   /usr/lib/python2.7/ensurepip/__init__.pyt   _run_pip%   s    c          C  sm   t  �  d }  t j d |  � } t | � d k rS t j j | d � j d � d St d |  |  f � � d S(   sA   
    Returns a string specifying the bundled version of pip.
    R	   s!   /usr/share/python-wheels/%s-*.whli   i    t   -sb   missing dependency wheel %s. Installation of the python-%s-whl package is needed to use ensurepip.N(   R   t   globt   lent   osR   t   basenamet   splitt   RuntimeError(   t   whl_namet   wheel_names(    (    s(   /usr/lib/python2.7/ensurepip/__init__.pyR   /   s    !c          C  sZ   g  t  j D] }  |  j d � r
 |  ^ q
 } x | D] }  t  j |  =q2 Wt  j t  j d <d  S(   Nt   PIP_t   PIP_CONFIG_FILE(   R   t   environt
   startswitht   devnull(   t   kt   keys_to_remove(    (    s(   /usr/lib/python2.7/ensurepip/__init__.pyt#   _disable_pip_configuration_settings;   s    +
i    c      
   C  s/   t  d |  d | d | d | d | d | � d S(   s�   
    Bootstrap pip into the current Python installation (or the given root
    directory).
    Note that calling this function will alter both sys.path and os.environ.
    t   roott   upgradet   usert
   altinstallt   default_pipt	   verbosityN(   t
   _bootstrap(   R#   R$   R%   R&