<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
ž
à’Re 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 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 l Z d d l m Z d d l m Z m Z d d l Z d d l m Z m Z d d l m Z d d l m Z m Z d d l m Z d d	 l m Z m Z d d
 l  m! Z! m" Z" m# Z# m$ Z$ d d l% m& Z& m' Z' d d l( m) Z) d d l* m+ Z+ d d l, m- Z- d d l, m. Z. d d l( m/ Z/ m0 Z0 d d l1 m2 Z2 m3 Z3 m4 Z4 m5 Z5 m6 Z6 d d l m7 Z7 m8 Z8 m9 Z9 m: Z: m; Z; m< Z< m= Z= m> Z> m? Z? m@ Z@ mA ZA mB ZB mC ZC mD ZD mE ZE e jF jG d e jH jI e jJ ƒ ƒ ZK d d d d d d g ZL d d „  ZM d d „  ZN e jO d f k rÝd d „  ZP d  d! „  ZQ n d" d „  ZP d# d! „  ZQ Gd$ d „  d e ƒ ZR d% d& „  ZS d' d( „  ZT d) d „  ZU d* d „  ZV d+ d, „  ZW Gd- d „  d e= ƒ ZX eK eY d. d/ „ ZZ d0 d1 „  Z[ d2 d3 „  Z\ d4 d5 „  Z] d6 d7 d8 „ Z^ d9 d: „  Z_ d; d< „  Z` d= d> „  Za y d d? l mb Zc Wn ed k
 rúd@ dA „  Zc Yn XdB dC „  Zb dD dE „  Ze GdF dG „  dG ef ƒ Zg GdH dI „  dI eg ƒ Zh GdJ dK „  dK eh ƒ Zi eg jj Zj dL dM „  Zk dN dO „  Zl eY e[ dP dQ „ Zm dR dS „  Zn dT dU „  Zo ep dV d „ Zq d S(W   u  
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

i    N(   u   glob(   u   logu   dir_util(   u   Commandu   _dont_write_bytecode(   u	   run_setup(   u   get_pathu   get_config_vars(   u   get_platform(   u   convert_pathu
   subst_vars(   u   DistutilsArgErroru   DistutilsOptionErroru   DistutilsErroru   DistutilsPlatformError(   u   INSTALL_SCHEMESu   SCHEME_KEYS(   u   setopt(   u   unpack_archive(   u   PackageIndex(   u
   URL_SCHEME(   u	   bdist_eggu   egg_info(   u	   iteritemsu   maxsizeu
   basestringu   unicodeu   reraise(   u   yield_linesu   normalize_pathu   resource_stringu   ensure_directoryu   get_distributionu   find_distributionsu   Environmentu   Requirementu   Distributionu   PathMetadatau   EggMetadatau
   WorkingSetu   DistributionNotFoundu   VersionConflictu   DEVELOP_DISTu   __VENV_LAUNCHER__u   samefileu   easy_installu   PthDistributionsu   extract_wininst_cfgu   mainu   get_exe_prefixesc               C   s   t  j d ƒ d k S(   Nu   Pi   (   u   structu   calcsize(    (    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   is_64bit@   s    u   is_64bitc             C   s›   t  j j |  ƒ o! t  j j | ƒ } t t  j d ƒ o9 | } | rU t  j j |  | ƒ St  j j t  j j |  ƒ ƒ } t  j j t  j j | ƒ ƒ } | | k S(   Nu   samefile(   u   osu   pathu   existsu   hasattru   samefileu   normpathu   normcase(   u   p1u   p2u
   both_existu   use_samefileu   norm_p1u   norm_p2(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   samefileC   s    $i   c             C   s   |  S(   N(    (   u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   _to_asciiM   s    u	   _to_asciic             C   s2   y t  |  d ƒ d SWn t k
 r- d SYn Xd  S(   Nu   asciiTF(   u   unicodeu   Trueu   UnicodeErroru   False(   u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   isasciiO   s
    u   isasciic             C   s   |  j  d ƒ S(   Nu   ascii(   u   encode(   u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   _to_asciiV   s    c             C   s2   y |  j  d ƒ d SWn t k
 r- d SYn Xd  S(   Nu   asciiTF(   u   encodeu   Trueu   UnicodeErroru   False(   u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   isasciiX   s
    c             B   s'  |  Ee  Z d  Z d Z d Z d  Z d¡ d¢ d£ d¤ d¥ d¦ d§ d¨ d© dª d« d¬ d­ d® d¯ d° d± d² d³ d´ dµ g Z d d d d d d. d1 d7 d: g	 Z	 e
 j rÄ d> e
 j Z e j d? dŸ e f ƒ e	 j d? ƒ n  i d d( 6Z e Z d@ dA „  Z dB dC „  Z dD dE „  Z dF dG „  Z dH dI „  Z dJ dK „  Z dL dM „  Z dN dO „  Z dP dQ „  Z dR dS „  Z dT dU „  Z dV dW „  Z dX dY „  Z dZ d[ „  Z d\ d] „  Z  d^ d_ „  Z! d¶ d` da „ Z# d¶ db dc „ Z$ dd de „  Z% d  df dg „ Z& dh di „  Z' dj dk „  Z( dl dm „  Z) dŸ dn do „ Z* dp f  dq dr „ Z+ ds dt „  Z, du dv „  Z- dw dx „  Z. dy dz „  Z/ d{ d| „  Z0 d} d~ d „ Z1 d€ d „  Z2 d‚ dƒ „  Z3 d„ d… „  Z4 d† d‡ „  Z5 dˆ d‰ „  Z6 dŠ d‹ „  Z7 dŒ d „  Z8 dŽ d „  Z9 d d‘ „  Z: d’ d“ „  Z; d” d• „  Z< e= d– e= d— d˜ d™ dš ƒ ƒ Z> e= d— d› d™ dœ ƒ Z? d dž „  Z@ dŸ S(·   u   easy_installu'   Manage a download/build/install processu    Find/get/install Python packagesu   prefix=u   installation prefixu   zip-oku   zu   install package as a zipfileu   multi-versionu   mu%   make apps have to require() a versionu   upgradeu   Uu1   force upgrade (searches PyPI for latest versions)u   install-dir=u   du   install package to DIRu   script-dir=u   su   install scripts to DIRu   exclude-scriptsu   xu   Don't install scriptsu   always-copyu   au'   Copy all needed packages to install diru
   index-url=u   iu    base URL of Python Package Indexu   find-links=u   fu(   additional URL(s) to search for packagesu   build-directory=u   bu/   download/extract/build in DIR; keep the resultsu	   optimize=u   Oul   also compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]u   record=u3   filename in which to record list of installed filesu   always-unzipu   Zu*   don't install as a zipfile, no matter whatu
   site-dirs=u   Su)   list of directories where .pth files worku   editableu   eu+   Install specified packages in editable formu   no-depsu   Nu   don't install dependenciesu   allow-hosts=u   Hu$   pattern(s) that hostnames must matchu   local-snapshots-oku   lu(   allow building eggs from local checkoutsu   versionu"   print version information and exitu   no-find-linksu9   Don't load find-links defined in packages being installedu!   install in user site-package '%s'u   userc             C   sÛ  t  j r3 t j j t ƒ } | j t  j ƒ |  _ n	 d |  _ d  |  _
 |  _ d  |  _ |  _ |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _ |  _ d  |  _ |  _ |  _ d  |  _ |  _ |  _ d  |  _ |  _ |  _ d  |  _ d  |  _ d  |  _  d  |  _! d  |  _" d  |  _# d  |  _$ d  |  _% d  |  _& t  j rQt  j' |  _( t  j |  _) n d  |  _( d  |  _) d  |  _* d  |  _+ d  |  _, |  _- d  |  _. i  |  _/ d |  _1 d  |  _2 |  j3 j4 |  _4 |  j3 j5 |  |  j3 j6 d ƒ ƒ d  S(   Ni    u   easy_installF(7   u   siteu   ENABLE_USER_SITEu   osu   pathu   abspathu   __file__u
   startswithu	   USER_SITEu   useru   Noneu   zip_oku   local_snapshots_oku   install_diru
   script_diru   exclude_scriptsu	   index_urlu
   find_linksu   build_directoryu   argsu   optimizeu   recordu   upgradeu   always_copyu   multi_versionu   editableu   no_depsu   allow_hostsu   rootu   prefixu	   no_reportu   versionu   install_purelibu   install_platlibu   install_headersu   install_libu   install_scriptsu   install_datau   install_baseu   install_platbaseu	   USER_BASEu   install_userbaseu   install_usersiteu   no_find_linksu   package_indexu   pth_fileu   always_copy_fromu	   site_dirsu   installed_projectsu   Falseu   sitepy_installedu   _dry_runu   distributionu   verboseu   _set_command_optionsu   get_option_dict(   u   selfu   whereami(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   initialize_options   sL    																									u   easy_install.initialize_optionsc             C   s—   x | D]ˆ } t  j j | ƒ s1 t  j j | ƒ r t j d | ƒ |  j s t  j j | ƒ r| t  j j | ƒ r| t | ƒ qŒ t  j	 | ƒ q q q Wd  S(   Nu   Deleting %s(
   u   osu   pathu   existsu   islinku   logu   infou   dry_runu   isdiru   rmtreeu   unlink(   u   selfu   blockersu   filename(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   delete_blockersÂ   s    $	%u   easy_install.delete_blockersc       	      C   sx  |  j  r- t d t d ƒ j  ƒ t j ƒ  n  t j  j ƒ  d } t d d ƒ \ } } i |  j j ƒ  d 6|  j j	 ƒ  d 6|  j j
 ƒ  d 6| d	 6| d d
 … d 6| d | d d 6| d 6| d 6| d 6| d 6t t d d ƒ d 6|  _ t j r|  j |  j d <|  j |  j d <n  |  j r—t j r—|  j ƒ  |  j d  k rNt d ƒ ‚ n  |  j |  _ |  _ t j d k r€|  j d ƒ q—|  j t j d ƒ n  |  j ƒ  |  j ƒ  |  j d d d d ƒ |  j d  k rß|  j |  _ n  |  j d  k rúd. |  _ n  |  j! d d/ ƒ |  j! d d0 ƒ |  j rG|  j" rG|  j" |  _ |  j# |  _ n  |  j! d d1 ƒ t$ t% t j& ƒ } t' ƒ  |  _( |  j) d  k	 rd  d! „  |  j) j d" ƒ Dƒ } xq | D]f } t j& j* | ƒ sÕt+ j, d# | ƒ qªt% | ƒ | k rút- | d$ ƒ ‚ qª|  j( j. t% | ƒ ƒ qªWn  |  j/ s-|  j0 ƒ  n  |  j1 p9d% |  _1 |  j( d  d  … |  _2 xE |  j t% |  j ƒ f D]+ } | |  j2 k rn|  j2 j3 d | ƒ qnqnW|  j4 d  k	 rÎd& d! „  |  j4 j d" ƒ Dƒ } n	 d' g } |  j5 d  k r|  j6 |  j1 d( |  j2 d) | ƒ|  _5 n  t7 |  j2 t j& ƒ |  _8 |  j9 d  k	 r_t: |  j9 t; ƒ rh|  j9 j ƒ  |  _9 qhn	 g  |  _9 |  j< rŽ|  j5 j= |  j2 t j& ƒ n  |  j s­|  j5 j> |  j9 ƒ n  |  j! d d2 ƒ t: |  j? t@ ƒ s1y> t@ |  j? ƒ |  _? d |  j? k oþd k n stA ‚ n  Wq1tA k
 r-t- d+ ƒ ‚ Yq1Xn  |  j/ rS|  jB rStC d, ƒ ‚ n  |  jD sktC d- ƒ ‚ n  g  |  _E d  S(3   Nu   setuptools %su
   setuptoolsi    u   prefixu   exec_prefixu	   dist_nameu   dist_versionu   dist_fullnameu
   py_versioni   u   py_version_shorti   u   py_version_nodotu
   sys_prefixu   sys_exec_prefixu   abiflagsu    u   userbaseu   usersiteu$   User base directory is not specifiedu   posixu	   unix_useru   _useru   install_diru
   script_diru   build_directoryu	   site_dirsu   install_libu   install_scriptsu   installu   recordc             S   s(   g  |  ] } t  j j | j ƒ  ƒ ‘ q S(    (   u   osu   pathu
   expanduseru   strip(   u   .0u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>  s   	 u1   easy_install.finalize_options.<locals>.<listcomp>u   ,u"   %s (in --site-dirs) does not existu$    (in --site-dirs) is not on sys.pathu   https://pypi.python.org/simplec             S   s   g  |  ] } | j  ƒ  ‘ q S(    (   u   strip(   u   .0u   s(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>)  s   	 u   *u   search_pathu   hostsu   optimizeu   --optimize must be 0, 1, or 2u9   Must specify a build directory (-b) when using --editableu:   No urls, filenames, or requirements specified (see --help)F(   u   install_diru   install_dir(   u   install_diru
   script_dir(   u   recordu   record(   u   optimizeu   optimize(F   u   versionu   printu   get_distributionu   sysu   exitu   splitu   get_config_varsu   distributionu   get_nameu   get_versionu   get_fullnameu   getattru   config_varsu   siteu   ENABLE_USER_SITEu   install_userbaseu   install_usersiteu   useru   create_home_pathu   Noneu   DistutilsPlatformErroru   install_baseu   install_platbaseu   osu   nameu   select_schemeu   expand_basedirsu   expand_dirsu   _expandu
   script_diru   install_diru   no_find_linksu   Falseu   set_undefined_optionsu   install_purelibu   install_scriptsu   mapu   normalize_pathu   pathu   get_site_dirsu   all_site_dirsu	   site_dirsu   isdiru   logu   warnu   DistutilsOptionErroru   appendu   editableu   check_site_diru	   index_urlu   shadow_pathu   insertu   allow_hostsu   package_indexu   create_indexu   Environmentu   local_indexu
   find_linksu
   isinstanceu
   basestringu   local_snapshots_oku   scan_egg_linksu   add_find_linksu   optimizeu   intu
   ValueErroru   build_directoryu   DistutilsArgErroru   argsu   outputs(	   u   selfu
   py_versionu   prefixu   exec_prefixu   normpathu	   site_dirsu   du	   path_itemu   hosts(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   finalize_optionsÌ   s¸    		


			 "	!			 	u   easy_install.finalize_optionsc             C   sˆ   x | D]y } t  |  | ƒ } | d  k	 r t j d k sF t j d k r[ t j j | ƒ } n  t | |  j ƒ } t |  | | ƒ q q Wd  S(   Nu   posixu   nt(	   u   getattru   Noneu   osu   nameu   pathu
   expanduseru
   subst_varsu   config_varsu   setattr(   u   selfu   attrsu   attru   val(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _expand_attrsM  s    u   easy_install._expand_attrsc             C   s   |  j  d d d g ƒ d S(   uN   Calls `os.path.expanduser` on install_base, install_platbase and
        root.u   install_baseu   install_platbaseu   rootN(   u   _expand_attrs(   u   self(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   expand_basedirsV  s    u   easy_install.expand_basedirsc             C   s#   |  j  d d d d d d g ƒ d S(   u+   Calls `os.path.expanduser` on install dirs.u   install_purelibu   install_platlibu   install_libu   install_headersu   install_scriptsu   install_dataN(   u   _expand_attrs(   u   self(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   expand_dirs[  s    u   easy_install.expand_dirsc             C   s  |  j  |  j j  k r( t j |  j  ƒ n  zÑ x% |  j D] } |  j | |  j ƒ q5 W|  j rî |  j } |  j	 rµ t
 |  j	 ƒ } x5 t t
 | ƒ ƒ D] } | | | d  … | | <q Wn  d d l m } |  j | j |  j | f d |  j ƒ n  |  j ƒ  Wd  t j |  j j  ƒ Xd  S(   Ni    (   u	   file_utilu'   writing list of installed files to '%s'(   u   verboseu   distributionu   logu   set_verbosityu   argsu   easy_installu   no_depsu   recordu   outputsu   rootu   lenu   rangeu	   distutilsu	   file_utilu   executeu
   write_fileu   warn_deprecated_options(   u   selfu   specu   outputsu   root_lenu   counteru	   file_util(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   runa  s$    			u   easy_install.runc          
   C   sG   y t  j ƒ  } Wn t j d t ƒ } Yn Xt  j j |  j d | ƒ S(   uÈ   Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        i    u   test-easy-install-%s(   u   osu   getpidu   randomu   randintu   maxsizeu   pathu   joinu   install_dir(   u   selfu   pid(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   pseudo_tempnamew  s
    u   easy_install.pseudo_tempnamec             C   s   d  S(   N(    (   u   self(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   warn_deprecated_options‚  s    u$   easy_install.warn_deprecated_optionsc             C   sÀ  t  |  j ƒ } t j j | d ƒ } | |  j k } | rS |  j rS |  j ƒ  } n |  j ƒ  d } t j j	 | ƒ } y: | rŽ t j
 | ƒ n  t | d ƒ j ƒ  t j
 | ƒ Wn" t t f k
 rÓ |  j ƒ  Yn X| rú |  j rú t |  j ƒ  ƒ ‚ n  | r*|  j d k r3t | |  j ƒ |  _ q3n	 d |  _ t j j d d ƒ j t j ƒ } | t t  d d „  | Dƒ ƒ k r‚d	 |  _ n1 |  j r³t j j	 | ƒ r³d	 |  _ d |  _ n  | |  _ d S(
   u;   Verify that self.install_dir is .pth-capable dir, if neededu   easy-install.pthu   .write-testu   wu
   PYTHONPATHu    c             S   s   g  |  ] } | r | ‘ q S(    (    (   u   .0u   _f(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>§  s   	 u/   easy_install.check_site_dir.<locals>.<listcomp>NT(   u   normalize_pathu   install_diru   osu   pathu   joinu   all_site_dirsu   multi_versionu   check_pth_processingu   pseudo_tempnameu   existsu   unlinku   openu   closeu   OSErroru   IOErroru   cant_write_to_targetu   DistutilsErroru   no_default_version_msgu   pth_fileu   Noneu   PthDistributionsu   environu   getu   splitu   pathsepu   mapu   Trueu   sitepy_installed(   u   selfu   instdiru   pth_fileu   is_site_diru   testfileu   test_existsu
   PYTHONPATH(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   check_site_dir…  s6     	!"	u   easy_install.check_site_dirc             C   s_   d } | t  j ƒ  d |  j f } t j j |  j ƒ sE | d 7} n
 | d 7} t | ƒ ‚ d  S(   Nu  can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    %s

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s
i   u    
This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
uK  
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
(   u   sysu   exc_infou   install_diru   osu   pathu   existsu   DistutilsError(   u   selfu   templateu   msg(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   cant_write_to_target¯  s    
u!   easy_install.cant_write_to_targetc             C   s.  |  j  } t j d | ƒ |  j ƒ  d } | d } t j j | ƒ } y] | r^ t j | ƒ n  t j j | ƒ } t j j | ƒ s’ t j	 | ƒ n  t
 | d ƒ } Wn" t t f k
 rÆ |  j ƒ  YnHXzì | j d | f ƒ | j ƒ  d } t j } t j d k rct j j | ƒ \ } } t j j | d ƒ }	 | j ƒ  d k rct j j |	 ƒ rc|	 } qcn  d	 d
 l m }
 |
 | d d d g d	 ƒ t j j | ƒ r²t j d | ƒ d SWd | rÉ| j ƒ  n  t j j | ƒ rët j | ƒ n  t j j | ƒ rt j | ƒ n  X|  j s*t j d | ƒ n  d S(   u@   Empirically verify whether .pth files are supported in inst. diru    Checking .pth file support in %su   .pthu   .oku   wu7   import os; f = open(%r, 'w'); f.write('OK'); f.close()
u   ntu   pythonw.exeu
   python.exei    (   u   spawnu   -Eu   -cu   passu-   TEST PASSED: %s appears to support .pth filesNu+   TEST FAILED: %s does NOT support .pth filesTF(   u   install_diru   logu   infou   pseudo_tempnameu   osu   pathu   existsu   unlinku   dirnameu   makedirsu   openu   OSErroru   IOErroru   cant_write_to_targetu   writeu   closeu   Noneu   sysu
   executableu   nameu   splitu   joinu   loweru   distutils.spawnu   spawnu   Trueu   multi_versionu   warnu   False(   u   selfu   instdiru   pth_fileu   ok_fileu	   ok_existsu   dirnameu   fu
   executableu   basenameu   altu   spawn(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   check_pth_processingÖ  sP    	
 
	$	u!   easy_install.check_pth_processingc             C   s€   |  j  ro | j d ƒ ro xS | j d ƒ D]? } | j d | ƒ rH q) n  |  j | | | j d | ƒ ƒ q) Wn  |  j | ƒ d S(   u=   Write all the scripts for `dist`, unless scripts are excludedu   scriptsu   scripts/N(   u   exclude_scriptsu   metadata_isdiru   metadata_listdiru   install_scriptu   get_metadatau   install_wrapper_scripts(   u   selfu   distu   script_name(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_egg_scripts  s    u    easy_install.install_egg_scriptsc             C   s|   t  j j | ƒ rh xc t  j | ƒ D]? \ } } } x- | D]% } |  j j t  j j | | ƒ ƒ q8 Wq" Wn |  j j | ƒ d  S(   N(   u   osu   pathu   isdiru   walku   outputsu   appendu   join(   u   selfu   pathu   baseu   dirsu   filesu   filename(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   add_output  s
    *u   easy_install.add_outputc             C   s#   |  j  r t d | f ƒ ‚ n  d  S(   Nuj   Invalid argument %r: you can't use filenames or URLs with --editable (except via the --find-links option).(   u   editableu   DistutilsArgError(   u   selfu   spec(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   not_editable  s    	u   easy_install.not_editablec             C   sW   |  j  s d  St j j t j j |  j | j ƒ ƒ rS t d | j |  j f ƒ ‚ n  d  S(   Nu2   %r already exists in %s; can't do a checkout there(   u   editableu   osu   pathu   existsu   joinu   build_directoryu   keyu   DistutilsArgError(   u   selfu   spec(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   check_editable$  s    	'u   easy_install.check_editablec             C   s®  t  j d d ƒ } d  } |  j s. |  j ƒ  n  zYt | t ƒ sÎ t | ƒ r‡ |  j | ƒ |  j	 j
 | | ƒ } |  j d  | | | d ƒ St j j | ƒ r¿ |  j | ƒ |  j d  | | | d ƒ St | ƒ } n  |  j | ƒ |  j	 j | | |  j |  j |  j |  j ƒ } | d  k rDd | } |  j r5| d 7} n  t | ƒ ‚ nB | j t k rm|  j | | | d ƒ | S|  j | | j | | ƒ SWd  t j j | ƒ r©t | ƒ n  Xd  S(   Nu   prefixu   easy_install-u+   Could not find suitable distribution for %ru2    (--always-copy skips system and development eggs)u   UsingT(   u   tempfileu   mkdtempu   Noneu   editableu   install_site_pyu
   isinstanceu   Requirementu
   URL_SCHEMEu   not_editableu   package_indexu   downloadu   install_itemu   Trueu   osu   pathu   existsu   parse_requirement_argu   check_editableu   fetch_distributionu   upgradeu   always_copyu   local_indexu   DistutilsErroru
   precedenceu   DEVELOP_DISTu   process_distributionu   locationu   rmtree(   u   selfu   specu   depsu   tmpdiru   downloadu   distu   msg(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   easy_install.  s:    	 	
	u   easy_install.easy_installc             C   s  | p |  j  } | p* t j j | ƒ | k } | p@ | j d ƒ } | p| |  j d  k	 o| t j j t | ƒ ƒ t |  j ƒ k } | rÃ | rÃ x4 |  j | j	 D] } | j
 | k r Pq q Wd } n  t j d t j j | ƒ ƒ | r!|  j | | | ƒ } xP | D] } |  j | | | ƒ qWn, |  j | ƒ g } |  j | | d | d ƒ | d  k	 r}x! | D] } | | k r`| Sq`Wn  d  S(   Nu   .eggu   Processing %si    u   UsingT(   u   always_copyu   osu   pathu   dirnameu   endswithu   always_copy_fromu   Noneu   normalize_pathu   local_indexu   project_nameu   locationu   Trueu   logu   infou   basenameu   install_eggsu   process_distributionu   egg_distribution(   u   selfu   specu   downloadu   tmpdiru   depsu   install_neededu   distu   dists(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_itemW  s.    	u   easy_install.install_itemc             C   sU   t  | } xD t D]< } d | } t |  | ƒ d k r t |  | | | ƒ q q Wd S(   u=   Sets the install directories by applying the install schemes.u   install_N(   u   INSTALL_SCHEMESu   SCHEME_KEYSu   getattru   Noneu   setattr(   u   selfu   nameu   schemeu   keyu   attrname(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   select_scheme{  s
    

u   easy_install.select_schemec             G   s6  |  j  | ƒ |  j j | ƒ |  j j | ƒ |  j | ƒ | |  j | j <t j |  j	 | | | Œ ƒ | j
 d ƒ r› |  j r› |  j j | j d ƒ ƒ n  | r° |  j r° d  S| d  k	 râ | j | j k râ t j d | ƒ d  S| d  k sú | | k r0| j ƒ  } | p| } t | j | j | j ƒ } n  t j d | ƒ y( t g  ƒ j | g |  j |  j ƒ } Wni t k
 rŸt j ƒ  d } t d | j ƒ ‚ Yn5 t k
 rÓt j ƒ  d } t d | j ƒ ‚ Yn X|  j sæ|  j r"x9 | D]. } | j |  j k rí|  j | j ƒ  ƒ qíqíWn  t j d | ƒ d  S(   Nu   dependency_links.txtu   Skipping dependencies for %su   Processing dependencies for %si   u'   Could not find required distribution %su7   Installed distribution %s conflicts with requirement %su'   Finished processing dependencies for %s(    u
   update_pthu   package_indexu   addu   local_indexu   install_egg_scriptsu   installed_projectsu   keyu   logu   infou   installation_reportu   has_metadatau   no_find_linksu   add_find_linksu   get_metadata_linesu   always_copyu   Noneu   warnu   as_requirementu   Requirementu   project_nameu   specsu   extrasu
   WorkingSetu   resolveu   easy_installu   DistributionNotFoundu   sysu   exc_infou   DistutilsErroru   argsu   VersionConflictu   always_copy_from(   u   selfu   requirementu   distu   depsu   infou   distrequ   distrosu   e(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   process_distribution„  sL    
	u!   easy_install.process_distributionc             C   sA   |  j  d  k	 r |  j  S| j d ƒ r* d S| j d ƒ s= d Sd S(   Nu   not-zip-safeu   zip-safeTF(   u   zip_oku   Noneu   has_metadatau   Trueu   False(   u   selfu   dist(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   should_unzip³  s    u   easy_install.should_unzipc             C   s  t  j j |  j | j ƒ } t  j j | ƒ rS d } t j | | j |  j | ƒ | St  j j | ƒ rn | } n€ t  j j	 | ƒ | k r– t  j
 | ƒ n  t  j | ƒ } t | ƒ d k rî t  j j | | d ƒ } t  j j | ƒ rî | } qî n  t | ƒ t j | | ƒ | S(   Nu<   %r already exists in %s; build directory %s will not be kepti   i    (   u   osu   pathu   joinu   build_directoryu   keyu   existsu   logu   warnu   isdiru   dirnameu   unlinku   listdiru   lenu   ensure_directoryu   shutilu   move(   u   selfu   specu   dist_filenameu
   setup_baseu   dstu   msgu   contents(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   maybe_move¼  s"    	
u   easy_install.maybe_movec             C   s4   |  j  s0 x$ t | ƒ D] } |  j | Œ  q Wn  d  S(   N(   u   exclude_scriptsu   get_script_argsu   write_script(   u   selfu   distu   args(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_wrapper_scriptsÑ  s    	u$   easy_install.install_wrapper_scriptsc                s—   t  | j ƒ  ƒ } t | | ƒ } ‡  f d d †  } | rz d ‰  | rZ ˆ  j d d ƒ ‰  n  t | ƒ | ˆ  ƒ t ƒ  } n  |  j | t | ƒ d ƒ d S(   u/   Generate a legacy script wrapper and install itc                s4   t  d ˆ  ƒ } | j d ƒ } | j d d ƒ } | S(   um  
            There are a couple of template scripts in the package. This
            function loads one of them and prepares it for use.

            These templates use triple-quotes to escape variable
            substitutions so the scripts get the 2to3 treatment when build
            on Python 3. The templates cannot use triple-quotes naturally.
            u
   setuptoolsu   utf-8u   """u    (   u   resource_stringu   decodeu   replace(   u   filenameu	   raw_bytesu   template_stru   clean_template(   u   template_name(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_templateÛ  s    	u1   easy_install.install_script.<locals>.get_templateu   script template.pyu   .pyu	    (dev).pyu   bN(   u   stru   as_requirementu   is_python_scriptu   replaceu   get_script_headeru   localsu   write_scriptu	   _to_ascii(   u   selfu   distu   script_nameu   script_textu   dev_pathu   specu	   is_scriptu   get_template(    (   u   template_nameu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_scriptÖ  s    	u   easy_install.install_scriptu   tc                sÛ   ˆ  j  ‡  f d d †  | Dƒ ƒ t j d | ˆ  j ƒ t j j ˆ  j | ƒ } ˆ  j | ƒ t ƒ  } ˆ  j	 s× t
 | ƒ t j j | ƒ r™ t j | ƒ n  t | d | ƒ } | j | ƒ | j ƒ  t | d | ƒ n  d S(   u1   Write an executable file to the scripts directoryc                s(   g  |  ] } t  j j ˆ  j | ƒ ‘ q S(    (   u   osu   pathu   joinu
   script_dir(   u   .0u   x(   u   self(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>ô  s   	 u-   easy_install.write_script.<locals>.<listcomp>u   Installing %s script to %su   wiÿ  N(   u   delete_blockersu   logu   infou
   script_diru   osu   pathu   joinu
   add_outputu   current_umasku   dry_runu   ensure_directoryu   existsu   unlinku   openu   writeu   closeu   chmod(   u   selfu   script_nameu   contentsu   modeu   blockersu   targetu   masku   f(    (   u   selfu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   write_scriptñ  s    		

u   easy_install.write_scriptc             C   sÓ  | j  ƒ  j d ƒ r( |  j | | ƒ g S| j  ƒ  j d ƒ rP |  j | | ƒ g S| } t j j | ƒ rŽ | j d ƒ rŽ t | | |  j ƒ n' t j j	 | ƒ rµ t j j
 | ƒ } n  | j | ƒ rñ |  j rñ | d  k	 rñ |  j | | | ƒ } n  t j j | d ƒ } t j j | ƒ s™t t j j | d d ƒ ƒ } | s[t d t j j
 | ƒ ƒ ‚ n  t | ƒ d k rŒt d t j j
 | ƒ ƒ ‚ n  | d	 } n  |  j r¿t j |  j | | ƒ ƒ g  S|  j | | ƒ Sd  S(
   Nu   .eggu   .exeu   .pyu   setup.pyu   *u"   Couldn't find a setup script in %si   u   Multiple setup scripts in %si    (   u   loweru   endswithu   install_eggu   install_exeu   osu   pathu   isfileu   unpack_archiveu   unpack_progressu   isdiru   abspathu
   startswithu   build_directoryu   Noneu
   maybe_moveu   joinu   existsu   globu   DistutilsErroru   lenu   editableu   logu   infou   report_editableu   build_and_install(   u   selfu   specu   dist_filenameu   tmpdiru
   setup_baseu   setup_scriptu   setups(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_eggs  s4    "	u   easy_install.install_eggsc             C   s[   t  j j | ƒ r3 t | t  j j | d ƒ ƒ } n t t j | ƒ ƒ } t j	 | d | ƒS(   Nu   EGG-INFOu   metadata(
   u   osu   pathu   isdiru   PathMetadatau   joinu   EggMetadatau	   zipimportu   zipimporteru   Distributionu   from_filename(   u   selfu   egg_pathu   metadata(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   egg_distribution+  s    !u   easy_install.egg_distributionc             C   sè  t  j j |  j t  j j | ƒ ƒ } t  j j | ƒ } |  j sL t | ƒ n  |  j | ƒ } t	 | | ƒ sÎt  j j
 | ƒ r¨ t  j j | ƒ r¨ t j | d |  j ƒn2 t  j j | ƒ rÚ |  j t  j | f d | ƒ n  t | ƒ t  j j
 | ƒ r+| j | ƒ rt j d } } qŒt j d } } na |  j | ƒ rZ|  j | ƒ |  j d } } n2 | j | ƒ r|t j d } } n t j d } } |  j | | | f | d t  j j | ƒ t  j j | ƒ f ƒ n  |  j | ƒ |  j | ƒ S(   Nu   dry_runu	   Removing u   Movingu   Copyingu
   Extractingu	    %s to %s(   u   osu   pathu   joinu   install_diru   basenameu   abspathu   dry_runu   ensure_directoryu   egg_distributionu   samefileu   isdiru   islinku   dir_utilu   remove_treeu   existsu   executeu   unlinku   uncache_zipdiru
   startswithu   shutilu   moveu   copytreeu   should_unzipu   mkpathu   unpack_and_compileu   copy2u   dirnameu
   add_output(   u   selfu   egg_pathu   tmpdiru   destinationu   distu   fu   m(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_egg2  s4    $	% 
)u   easy_install.install_eggc                sê  t  | ƒ } | d  k r+ t d | ƒ ‚ n  t d  d | j d d ƒ d | j d d ƒ d t ƒ  ƒ} t j j | | j	 ƒ  d ƒ } | _
 | d } t j j | d	 ƒ } t j j | d
 ƒ } t | ƒ t | | ƒ | _ |  j | | ƒ t j j | ƒ s}t | d ƒ }	 |	 j d ƒ xU | j d ƒ D]D \ }
 } |
 d k r(|	 j d |
 j d d ƒ j ƒ  | f ƒ q(q(W|	 j ƒ  n  t j j | d ƒ ‰  |  j ‡  f d d †  t | ƒ Dƒ ƒ t j | | d |  j d |  j ƒ|  j | | ƒ S(   Nu(   %s is not a valid distutils Windows .exeu   project_nameu   metadatau   nameu   versionu   platformu   .eggu   .tmpu   EGG-INFOu   PKG-INFOu   wu   Metadata-Version: 1.0
u   target_versionu   %s: %s
u   _u   -u   scriptsc                s)   g  |  ] } t  j j ˆ  | d  ƒ ‘ q S(   i    (   u   osu   pathu   join(   u   .0u   args(   u
   script_dir(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>t  s   	 u,   easy_install.install_exe.<locals>.<listcomp>u   verboseu   dry_run(   u   extract_wininst_cfgu   Noneu   DistutilsErroru   Distributionu   getu   get_platformu   osu   pathu   joinu   egg_nameu   locationu   ensure_directoryu   PathMetadatau	   _provideru
   exe_to_eggu   existsu   openu   writeu   itemsu   replaceu   titleu   closeu   delete_blockersu   get_script_argsu	   bdist_eggu   make_zipfileu   verboseu   dry_runu   install_egg(   u   selfu   dist_filenameu   tmpdiru   cfgu   distu   egg_pathu   egg_tmpu	   _egg_infou   pkg_infu   fu   ku   v(    (   u
   script_diru8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_exeS  s8    &

0 u   easy_install.install_exec                s¶  t  | ƒ ‰ g  ‰ g  ‰ i  ‰ ‡  ‡ ‡ ‡ ‡ f d d †  } t | ˆ  | ƒ g  } x™ ˆ D]‘ } | j ƒ  j d ƒ rY | j d ƒ } | d } t j | d ƒ d | d <t j j	 ˆ  | Œ } ˆ j
 | ƒ | j
 | ƒ t j | | ƒ qY qY W|  j ˆ ƒ t j t j j	 ˆ  d ƒ t j ˆ  | ƒ ƒ x‰ d D] }	 t ƒ  |	 r-t j j	 ˆ  d |	 d
 ƒ }
 t j j |
 ƒ s®t |
 d ƒ } | j d j	 t ƒ  |	 ƒ d ƒ | j ƒ  q®q-q-Wd S(   u;   Extract a bdist_wininst to the directories an egg would usec                sR  |  j  ƒ  } xˆ D]\ } } | j | ƒ r | |  t | ƒ d  … }  |  j d ƒ } t j j ˆ  | Œ } | j  ƒ  } | j d ƒ s– | j d ƒ rÛ t j	 | d
 ƒ | d <d ˆ t j j
 | d ƒ d <ˆ j |  ƒ nI | j d ƒ r$| d k r$d ˆ t j j
 | d ƒ d <ˆ j | ƒ n  | Sq W|  j d ƒ sNt j d	 |  ƒ n  d  S(   Nu   /u   .pydu   .dlli   i    u   .pyu   SCRIPTS/u   .pthu   WARNING: can't process %siÿÿÿÿiÿÿÿÿ(   u   loweru
   startswithu   lenu   splitu   osu   pathu   joinu   endswithu	   bdist_eggu   strip_moduleu   splitextu   appendu   logu   warnu   None(   u   srcu   dstu   su   oldu   newu   partsu   dl(   u   egg_tmpu   native_libsu   prefixesu
   to_compileu	   top_level(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   process„  s$    u(   easy_install.exe_to_egg.<locals>.processu   .pydu   /i   u   .pyu   EGG-INFOu	   top_levelu   native_libsu   .txtu   wu   
Niÿÿÿÿiÿÿÿÿiÿÿÿÿ(   u	   top_levelu   native_libs(   u   get_exe_prefixesu   unpack_archiveu   loweru   endswithu   splitu	   bdist_eggu   strip_moduleu   osu   pathu   joinu   appendu
   write_stubu   byte_compileu   write_safety_flagu   analyze_eggu   localsu   existsu   openu   writeu   close(   u   selfu   dist_filenameu   egg_tmpu   processu   stubsu   resu   partsu   resourceu   pyfileu   nameu   txtu   f(    (   u   egg_tmpu   native_libsu   prefixesu
   to_compileu	   top_levelu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   exe_to_egg}  s4    
!u   easy_install.exe_to_eggu	   Installedc       	      C   sz   d } |  j  rN |  j rN | d 7} |  j t t t j ƒ k rN | d 7} qN n  | j } | j } | j	 } d } | t
 ƒ  S(   u9   Helpful installation message for display to package usersu   
%(what)s %(eggloc)s%(extras)sué  

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("%(name)s")  # latest installed version
    pkg_resources.require("%(name)s==%(version)s")  # this exact version
    pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
uÖ   

Note also that the installation directory must be on sys.path at runtime for
this to work.  (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
u    (   u   multi_versionu	   no_reportu   install_diru   mapu   normalize_pathu   sysu   pathu   locationu   project_nameu   versionu   locals(	   u   selfu   requ   distu   whatu   msgu   egglocu   nameu   versionu   extras(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   installation_report¯  s    
			u    easy_install.installation_reportc             C   s&   t  j j | ƒ } t j } d t ƒ  S(   Nu"  
Extracted editable version of %(spec)s to %(dirname)s

If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::

    %(python)s setup.py develop

See the setuptools documentation for the "develop" command for more info.
(   u   osu   pathu   dirnameu   sysu
   executableu   locals(   u   selfu   specu   setup_scriptu   dirnameu   python(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   report_editableË  s    		u   easy_install.report_editablec             C   s+  t  j j d t ƒ t  j j d t ƒ t | ƒ } |  j d k ri d |  j d } | j d d | ƒ n" |  j d k  r‹ | j d d ƒ n  |  j r§ | j d d	 ƒ n  t	 j
 d
 | t | ƒ d d  … d j | ƒ ƒ y t | | ƒ Wn< t k
 r&t  j ƒ  d } t d | j d f ƒ ‚ Yn Xd  S(   Nu   distutils.command.bdist_eggu   distutils.command.egg_infoi   u   vi   i    u   -u   -qu   -nu   Running %s %su    u   Setup script exited with %s(   u   sysu   modulesu
   setdefaultu	   bdist_eggu   egg_infou   listu   verboseu   insertu   dry_runu   logu   infou   lenu   joinu	   run_setupu
   SystemExitu   exc_infou   DistutilsErroru   args(   u   selfu   setup_scriptu
   setup_baseu   argsu   v(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   run_setupØ  s"    	*u   easy_install.run_setupc       	      C   s  d d g } t  j d d d t j j | ƒ ƒ } z¼ |  j t j j | ƒ ƒ | j | ƒ |  j | | | ƒ t | g ƒ } g  } x? | D]7 } x. | | D]" } | j |  j	 | j
 | ƒ ƒ q™ Wqˆ W| rç |  j rç t j d | ƒ n  | SWd  t | ƒ t j |  j ƒ Xd  S(   Nu	   bdist_eggu
   --dist-diru   prefixu   egg-dist-tmp-u   diru+   No eggs found in %s (setup script problem?)(   u   tempfileu   mkdtempu   osu   pathu   dirnameu   _set_fetcher_optionsu   appendu	   run_setupu   Environmentu   install_eggu   locationu   dry_runu   logu   warnu   rmtreeu   set_verbosityu   verbose(	   u   selfu   setup_scriptu
   setup_baseu   argsu   dist_diru   all_eggsu   eggsu   keyu   dist(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   build_and_installí  s$    	$	

u   easy_install.build_and_installc       	      C   s¥   |  j  j d ƒ j ƒ  } d } i  } xF | j ƒ  D]8 \ } } | | k rO q1 n  | d | | j d d	 ƒ <q1 Wt d | ƒ } t j j | d
 ƒ } t	 j
 | | ƒ d S(   u  
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        u   easy_installu
   find_linksu	   site_dirsu	   index_urlu   optimizeu   allow_hostsi   u   _u   -u	   setup.cfgN(   u
   find_linksu	   site_dirsu	   index_urlu   optimizeu	   site_dirsu   allow_hosts(   u   distributionu   get_option_dictu   copyu   itemsu   replaceu   dictu   osu   pathu   joinu   setoptu   edit_config(	   u   selfu   baseu   ei_optsu   fetch_directivesu   fetch_optionsu   keyu   valu   settingsu   cfg_filename(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _set_fetcher_options  s    	  u!   easy_install._set_fetcher_optionsc             C   s²  |  j  d  k r d  Sx~ |  j  | j D]l } |  j sE | j | j k r$ t j d | ƒ |  j  j | ƒ | j |  j k r |  j j | j ƒ q q$ q$ W|  j s| j |  j  j	 k rÅ t j d | ƒ qt j d | ƒ |  j  j
 | ƒ | j |  j k r|  j j | j ƒ qn  |  j s®|  j  j ƒ  | j d k r®t j j |  j d ƒ } t j j | ƒ rot j | ƒ n  t | d ƒ } | j |  j  j | j ƒ d ƒ | j ƒ  q®n  d  S(   Nu&   Removing %s from easy-install.pth fileu4   %s is already the active version in easy-install.pthu"   Adding %s to easy-install.pth fileu
   setuptoolsu   setuptools.pthu   wtu   
(   u   pth_fileu   Noneu   keyu   multi_versionu   locationu   logu   infou   removeu   shadow_pathu   pathsu   addu   appendu   dry_runu   saveu   osu   pathu   joinu   install_diru   islinku   unlinku   openu   writeu   make_relativeu   close(   u   selfu   distu   du   filenameu   f(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   update_pth  s4    	
	  u   easy_install.update_pthc             C   s   t  j d | | ƒ | S(   Nu   Unpacking %s to %s(   u   logu   debug(   u   selfu   srcu   dst(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   unpack_progress@  s    u   easy_install.unpack_progressc                s   g  ‰ g  ‰ ‡  ‡ ‡ f d d †  } t  | | | ƒ ˆ  j ˆ ƒ ˆ  j s‰ x< ˆ D]1 } t j | ƒ t j d Bd @} t | | ƒ qQ Wn  d  S(   Nc                s   | j  d ƒ r/ |  j d ƒ r/ ˆ j | ƒ n. | j  d ƒ sM | j  d ƒ r] ˆ j | ƒ n  ˆ  j |  | ƒ ˆ  j r} | p€ d  S(   Nu   .pyu	   EGG-INFO/u   .dllu   .so(   u   endswithu
   startswithu   appendu   unpack_progressu   dry_runu   None(   u   srcu   dst(   u   selfu   to_chmodu
   to_compile(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   pfI  s    u+   easy_install.unpack_and_compile.<locals>.pfim  ií  (   u   unpack_archiveu   byte_compileu   dry_runu   osu   statu   ST_MODEu   chmod(   u   selfu   egg_pathu   destinationu   pfu   fu   mode(    (   u   selfu   to_chmodu
   to_compileu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   unpack_and_compileE  s    	u   easy_install.unpack_and_compilec             C   s¤   t  r |  j d ƒ d  Sd d l m } ze t j |  j d ƒ | | d d d d d |  j ƒ|  j r‹ | | d |  j d d d |  j ƒn  Wd  t j |  j ƒ Xd  S(   Nu%   byte-compiling is disabled, skipping.i    (   u   byte_compilei   u   optimizeu   forceu   dry_run(	   u   _dont_write_bytecodeu   warnu   distutils.utilu   byte_compileu   logu   set_verbosityu   verboseu   dry_runu   optimize(   u   selfu
   to_compileu   byte_compile(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   byte_compileX  s    	u   easy_install.byte_compilec             C   s&   d } | |  j  t j j d d ƒ f S(   Nuæ  bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    %s

and your PYTHONPATH environment variable currently contains:

    %r

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.u
   PYTHONPATHu    (   u   install_diru   osu   environu   get(   u   selfu   template(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   no_default_version_msgk  s    u#   easy_install.no_default_version_msgc             C   s?  |  j  r d St j j |  j d ƒ } t d d ƒ } d } t j j | ƒ rÇ t j d |  j ƒ t	 | d ƒ } | j
 ƒ  } t j d k r˜ | j ƒ  } n  | j ƒ  | j d	 ƒ sÇ t d
 | ƒ ‚ qÇ n  | | k r2t j d | ƒ |  j st | ƒ t	 | d ƒ } | j | ƒ | j ƒ  n  |  j | g ƒ n  d |  _  d S(   u8   Make sure there's a site.py in the target dir, if neededNu   site.pyu
   setuptoolsu   site-patch.pyu    u   Checking existing site.py in %su   rbi   u   def __boot():u;   %s is not a setuptools-generated site.py; please remove it.u   Creating %su   wb(   i   T(   u   sitepy_installedu   osu   pathu   joinu   install_diru   resource_stringu   existsu   logu   debugu   openu   readu   sysu   version_infou   decodeu   closeu
   startswithu   DistutilsErroru   infou   dry_runu   ensure_directoryu   writeu   byte_compileu   True(   u   selfu   sitepyu   sourceu   currentu   f(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   install_site_pyŠ  s2    	
	
u   easy_install.install_site_pyc             C   s   |  j  s d St t j j d ƒ ƒ } xc t |  j ƒ D]R \ } } | j | ƒ r5 t j j | ƒ r5 |  j	 d | ƒ t j
 | d ƒ q5 q5 Wd S(   u   Create directories under ~.Nu   ~u   os.makedirs('%s', 0700)iÀ  (   u   useru   convert_pathu   osu   pathu
   expanduseru	   iteritemsu   config_varsu
   startswithu   isdiru   debug_printu   makedirs(   u   selfu   homeu   nameu   path(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   create_home_path®  s    	"u   easy_install.create_home_pathu   posixu   install_diru/   $base/lib/python$py_version_short/site-packagesu
   script_diru	   $base/binu   $base/Lib/site-packagesu   $base/Scriptsc             G   s   |  j  d ƒ j } |  j rš | j ƒ  } |  j | d <|  j j t j |  j ƒ } xH | j	 ƒ  D]7 \ } } t
 |  | d  ƒ d  k r\ t |  | | ƒ q\ q\ Wn  d d l m } xo | D]g } t
 |  | ƒ } | d  k	 r± | | | ƒ } t j d k rt j j | ƒ } n  t |  | | ƒ q± q± Wd  S(   Nu   installu   basei    (   u
   subst_varsu   posix(   u   get_finalized_commandu   config_varsu   prefixu   copyu   INSTALL_SCHEMESu   getu   osu   nameu   DEFAULT_SCHEMEu   itemsu   getattru   Noneu   setattru   distutils.utilu
   subst_varsu   pathu
   expanduser(   u   selfu   attrsu   config_varsu   schemeu   attru   valu
   subst_vars(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _expandÄ  s     	u   easy_install._expandNT(   u   prefix=Nu   installation prefix(   u   zip-oku   zu   install package as a zipfile(   u   multi-versionu   mu%   make apps have to require() a version(   u   upgradeu   Uu1   force upgrade (searches PyPI for latest versions)(   u   install-dir=u   du   install package to DIR(   u   script-dir=u   su   install scripts to DIR(   u   exclude-scriptsu   xu   Don't install scripts(   u   always-copyu   au'   Copy all needed packages to install dir(   u
   index-url=u   iu    base URL of Python Package Index(   u   find-links=u   fu(   additional URL(s) to search for packages(   u   build-directory=u   bu/   download/extract/build in DIR; keep the results(   u	   optimize=u   Oul   also compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](   u   record=Nu3   filename in which to record list of installed files(   u   always-unzipu   Zu*   don't install as a zipfile, no matter what(   u
   site-dirs=u   Su)   list of directories where .pth files work(   u   editableu   eu+   Install specified packages in editable form(   u   no-depsu   Nu   don't install dependencies(   u   allow-hosts=u   Hu$   pattern(s) that hostnames must match(   u   local-snapshots-oku   lu(   allow building eggs from local checkouts(   u   versionNu"   print version information and exit(   u   no-find-linksNu9   Don't load find-links defined in packages being installedF(A   u   __name__u
   __module__u   __qualname__u   __doc__u   descriptionu   Trueu   command_consumes_argumentsu   Noneu   user_optionsu   boolean_optionsu   siteu   ENABLE_USER_SITEu	   USER_SITEu   help_msgu   appendu   negative_optu   PackageIndexu   create_indexu   initialize_optionsu   delete_blockersu   finalize_optionsu   _expand_attrsu   expand_basedirsu   expand_dirsu   runu   pseudo_tempnameu   warn_deprecated_optionsu   check_site_diru   cant_write_to_targetu   check_pth_processingu   install_egg_scriptsu
   add_outputu   not_editableu   check_editableu   Falseu   easy_installu   install_itemu   select_schemeu   process_distributionu   should_unzipu
   maybe_moveu   install_wrapper_scriptsu   install_scriptu   write_scriptu   install_eggsu   egg_distributionu   install_eggu   install_exeu
   exe_to_eggu   installation_reportu   report_editableu	   run_setupu   build_and_installu   _set_fetcher_optionsu
   update_pthu   unpack_progressu   unpack_and_compileu   byte_compileu   no_default_version_msgu   install_site_pyu   create_home_pathu   dictu   INSTALL_SCHEMESu   DEFAULT_SCHEMEu   _expand(   u
   __locals__(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   easy_install_   s°        		3
	*'0
)$	/	(!*2$$
	c           	   C   s  d d „  t  j j d d ƒ j t  j ƒ Dƒ }  t j g } t j t j k r_ | j t j ƒ n  x8| D]0} | rf t j	 d k r£ |  j t  j
 j | d d ƒ ƒ n‚ t  j d	 k r |  j t  j
 j | d
 d t j d  d … d ƒ t  j
 j | d
 d ƒ g ƒ n% |  j | t  j
 j | d
 d ƒ g ƒ t j	 d k r–d | k r“t  j j d ƒ } | r|  j t  j
 j | d d t j d  d … d ƒ ƒ qq“q–qf qf Wt d ƒ t d ƒ f } x* | D]" } | |  k r¹|  j | ƒ q¹q¹Wt j rû|  j t j ƒ n  t t t |  ƒ ƒ }  |  S(   Nc             S   s   g  |  ] } | r | ‘ q S(    (    (   u   .0u   _f(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>Û  s   	 u!   get_site_dirs.<locals>.<listcomp>u
   PYTHONPATHu    u   os2emxu   riscosu   Libu   site-packagesu   /u   libu   pythoni   u   site-pythonu   darwinu   Python.frameworku   HOMEu   Libraryu   Pythonu   purelibu   platlib(   u   os2emxu   riscos(   u   osu   environu   getu   splitu   pathsepu   sysu   prefixu   exec_prefixu   appendu   platformu   pathu   joinu   sepu   extendu   versionu   get_pathu   siteu   ENABLE_USER_SITEu	   USER_SITEu   listu   mapu   normalize_path(   u   sitedirsu   prefixesu   prefixu   homeu	   lib_pathsu   site_lib(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_site_dirsÙ  sF    " 	u   get_site_dirsc             c   s^  i  } xQ|  D]I} t  | ƒ } | | k r1 q n  d | | <t j j | ƒ sS q n  t j | ƒ } | | f Vxæ | D]Þ } | j d ƒ s qt n  | d k r¡ qt n  t t j j | | ƒ ƒ } t t	 | ƒ ƒ } | j
 ƒ  xw | D]o } | j d ƒ sß t  | j ƒ  ƒ } | | k rNd | | <t j j | ƒ s4qß n  | t j | ƒ f VqNqß qß Wqt Wq Wd S(   uB   Yield sys.path directories that might contain "old-style" packagesi   u   .pthu   easy-install.pthu   setuptools.pthu   importN(   u   easy-install.pthu   setuptools.pth(   u   normalize_pathu   osu   pathu   isdiru   listdiru   endswithu   openu   joinu   listu   yield_linesu   closeu
   startswithu   rstrip(   u   inputsu   seenu   dirnameu   filesu   nameu   fu   linesu   line(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   expand_paths  s4    


u   expand_pathsc             C   sÉ  t  |  d ƒ } z¨t j | ƒ } | d k r1 d S| d | d | d } | d k  r[ d S| j | d ƒ d d l m } m } d d l } | j	 d	 | j
 d ƒ ƒ \ } } }	 | d k rÂ d S| j | d | ƒ | j i d d 6d d 6ƒ }
 y~ | j
 | ƒ } t j d k r't d g ƒ } n t d ƒ } | j | d ƒ d } | j t j ƒ  ƒ } |
 j | | ƒ ƒ Wn | j k
 rd SYn X|
 j d ƒ s®|
 j d ƒ r²d S|
 SWd | j ƒ  Xd S(   un   Extract configuration data from a bdist_wininst .exe

    Returns a ConfigParser.RawConfigParser, or None
    u   rbi	   i   i   i   i    (   u   StringIOu   ConfigParserNu   <iiiizV4i{V4u    u   versionu   target_versioni   i   u   metadatau   Setup(   izV4i{V4(   i   i   (   u   openu   zipfileu   _EndRecDatau   Noneu   seeku   setuptools.compatu   StringIOu   ConfigParseru   structu   unpacku   readu   RawConfigParseru   sysu   version_infou   bytesu   chru   splitu   decodeu   getfilesystemencodingu   readfpu   Erroru   has_sectionu   close(   u   dist_filenameu   fu   endrecu	   prependedu   StringIOu   ConfigParseru   structu   tagu   cfglenu   bmlenu   cfgu   partu	   null_byteu   config(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   extract_wininst_cfg0  s<    $	 c             C   sÚ  d d d d d g } t  j |  ƒ } z}xv| j ƒ  D]h} | j } | j d ƒ } t | ƒ d	 k r· | d
 d k r· | d j d ƒ r· | j d d j | d d
 … ƒ d f ƒ Pq· n  t | ƒ d
 k s4 | j d ƒ rß q4 n  | j d ƒ rô q4 n  | d j	 ƒ  d k r4 | j
 | ƒ } t j d  k r7| j ƒ  } n  xb t | ƒ D]Q } | j ƒ  j d d ƒ } | j d ƒ sD| j d | d | f d f ƒ qDqDWq4 q4 WWd | j ƒ  Xd d „  | Dƒ } | j ƒ  | j ƒ  | S(!   u4   Get exe->egg path translations for a given .exe fileu   PURELIB/u    u   PLATLIB/pywin32_system32u   PLATLIB/u   SCRIPTS/u   EGG-INFO/scripts/u   DATA/lib/site-packagesu   /i   i   u   PKG-INFOi   u	   .egg-infoi    Nu	   EGG-INFO/u   .pthu
   -nspkg.pthu   PURELIBu   PLATLIBu   \u   importu   %s/%s/c             S   s(   g  |  ] \ } } | j  ƒ  | f ‘ q S(    (   u   lower(   u   .0u   xu   y(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>  s   	 u$   get_exe_prefixes.<locals>.<listcomp>(   u   PURELIB/u    (   u   PLATLIB/pywin32_system32u    (   u   PLATLIB/u    (   u   SCRIPTS/u   EGG-INFO/scripts/(   u   DATA/lib/site-packagesu    (   u   PURELIBu   PLATLIB(   i   (   u   zipfileu   ZipFileu   infolistu   filenameu   splitu   lenu   endswithu   insertu   joinu   upperu   readu   sysu   version_infou   decodeu   yield_linesu   stripu   replaceu
   startswithu   appendu   closeu   sortu   reverse(   u   exe_filenameu   prefixesu   zu   infou   nameu   partsu   contentsu   pth(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_exe_prefixes_  s<    		")"3

c             C   s=   y t  j |  ƒ SWn% t k
 r8 t d |  f ƒ ‚ Yn Xd  S(   Nu1   Not a URL, existing file, or requirement spec: %r(   u   Requirementu   parseu
   ValueErroru   DistutilsError(   u   spec(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   parse_requirement_arg…  s
    u   parse_requirement_argc             B   sk   |  Ee  Z d  Z d Z d Z f  d d „ Z d d „  Z d d „  Z d d	 „  Z	 d
 d „  Z
 d d „  Z d S(   u   PthDistributionsu)   A .pth file with Distribution paths in itc             C   sœ   | |  _  t t t | ƒ ƒ |  _ t t j j |  j  ƒ ƒ |  _ |  j	 ƒ  t
 j |  g  d  d  ƒ x6 t |  j ƒ D]% } t t |  j t | d ƒ ƒ ƒ qo Wd  S(   NT(   u   filenameu   listu   mapu   normalize_pathu   sitedirsu   osu   pathu   dirnameu   basediru   _loadu   Environmentu   __init__u   Noneu   yield_linesu   pathsu   addu   find_distributionsu   True(   u   selfu   filenameu   sitedirsu   path(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   __init__’  s    	
u   PthDistributions.__init__c             C   s„  g  |  _  d } t j |  j ƒ } t j j |  j ƒ r3t	 |  j d ƒ } xÛ | D]Ó } | j
 d ƒ rp d } qO n  | j ƒ  } |  j  j | ƒ | j ƒ  sO | j ƒ  j
 d ƒ r´ qO n  t t j j |  j | ƒ ƒ } |  j  d <t j j | ƒ sü | | k r|  j  j ƒ  d |  _ qO n  d | | <qO W| j ƒ  n  |  j  rO| rOd |  _ n  x. |  j  r|  j  d j ƒ  r|  j  j ƒ  qRWd  S(	   Nu   rtu   importu   #i   FTiÿÿÿÿiÿÿÿÿ(   u   pathsu   Falseu   dictu   fromkeysu   sitedirsu   osu   pathu   isfileu   filenameu   openu
   startswithu   Trueu   rstripu   appendu   stripu   normalize_pathu   joinu   basediru   existsu   popu   dirtyu   close(   u   selfu
   saw_importu   seenu   fu   lineu   path(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _load›  s2    	"&	 u   PthDistributions._loadc             C   sê   |  j  s d Sd j t |  j |  j ƒ ƒ } | r¢ t j d |  j ƒ d | } t j	 j
 |  j ƒ rv t j |  j ƒ n  t |  j d ƒ } | j | ƒ | j ƒ  n; t j	 j |  j ƒ rÝ t j d |  j ƒ t j |  j ƒ n  d |  _  d S(   u$   Write changed .pth file back to diskNu   
u	   Saving %su¼   import sys; sys.__plen = len(sys.path)
%s
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
u   wtu   Deleting empty %sF(   u   dirtyu   joinu   mapu   make_relativeu   pathsu   logu   debugu   filenameu   osu   pathu   islinku   unlinku   openu   writeu   closeu   existsu   False(   u   selfu   datau   f(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   saveº  s     	u   PthDistributions.savec             C   sl   | j  |  j k rX | j  |  j k s9 | j  t j ƒ  k rX |  j j | j  ƒ d |  _ n  t j	 |  | ƒ d S(   u"   Add `dist` to the distribution mapNT(
   u   locationu   pathsu   sitedirsu   osu   getcwdu   appendu   Trueu   dirtyu   Environmentu   add(   u   selfu   dist(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   add×  s    u   PthDistributions.addc             C   sI   x2 | j  |  j k r4 |  j j | j  ƒ d |  _ q Wt j |  | ƒ d S(   u'   Remove `dist` from the distribution mapNT(   u   locationu   pathsu   removeu   Trueu   dirtyu   Environment(   u   selfu   dist(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   removeá  s    u   PthDistributions.removec             C   sÐ   t  j j t | ƒ ƒ \ } } t |  j ƒ } | g } t  j d k rK d pQ t  j } xu t | ƒ | k rÇ | |  j k rŸ | j t  j	 ƒ | j
 ƒ  | j | ƒ St  j j | ƒ \ } } | j | ƒ qW W| Sd  S(   Nu   /(   u   osu   pathu   splitu   normalize_pathu   lenu   basediru   altsepu   sepu   appendu   curdiru   reverseu   join(   u   selfu   pathu   npathu   lastu   baselenu   partsu   sep(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   make_relativeè  s    	
u   PthDistributions.make_relativeNF(   u   __name__u
   __module__u   __qualname__u   __doc__u   Falseu   dirtyu   __init__u   _loadu   saveu   addu   removeu   make_relative(   u
   __locals__(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   PthDistributions  s   	
c             C   s/  d d l  m } t | j t ƒ s= t j | j j ƒ  ƒ } n  |  d j ƒ  d } | j	 | ƒ } d } | r— | j
 d ƒ p~ d } | r— d | } q— n  | r¦ d } n t | ƒ } d t ƒ  } t | ƒ s| r| j ƒ  j d	 ƒ rd
 | j ƒ  d d … } qqd
 } n  t | | ƒ } d t ƒ  } | S(   u;   Create a #! line, getting options (if any) from script_texti    (   u   first_line_reu   
u    i   u    u
   python.exeu   #!%(executable)s%(options)s
u   -u    -xN(   u   distutils.command.build_scriptsu   first_line_reu
   isinstanceu   patternu   stru   reu   compileu   decodeu
   splitlinesu   matchu   groupu   nt_quote_argu   localsu   isasciiu   stripu
   startswithu   fix_jython_executable(   u   script_textu
   executableu   wininstu   first_line_reu   firstu   matchu   optionsu   hdr(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_script_header÷  s,     	 	u   get_script_headerc             C   sz   |  t  j k r8 t  j d k r8 t | t j ƒ |  | ƒ St j ƒ  \ } } } t | | d | d d |  | f f ƒ d  S(   Nu   nti    i   u    %s %s(	   u   osu   removeu   nameu   chmodu   statu   S_IWRITEu   sysu   exc_infou   reraise(   u   funcu   argu   excu   etu   evu   _(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   auto_chmod  s
    
u
   auto_chmodc             C   s1   d d l  m } t |  | ƒ t |  t j ƒ d S(   u?   Ensure that the importer caches dont have stale info for `path`i    (   u   _zip_directory_cacheN(   u	   zipimportu   _zip_directory_cacheu   _uncacheu   sysu   path_importer_cache(   u   pathu   zdc(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   uncache_zipdir  s    u   uncache_zipdirc             C   sT   |  | k r | |  =n: t  |  ƒ }  x+ | D]# } t  | ƒ |  k r) | | =d  Sq) Wd  S(   N(   u   normalize_path(   u   pathu   cacheu   p(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _uncache#  s    
u   _uncacheu   <string>c             C   s;   y t  |  | d ƒ Wn t t f k
 r2 d SYn Xd Sd S(   u%   Is this string a valid Python script?u   execNFT(   u   compileu   SyntaxErroru	   TypeErroru   Falseu   True(   u   textu   filename(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   is_python-  s
    	u	   is_pythonc             C   sR   y) t  |  ƒ } | j d ƒ } | j ƒ  Wn t t f k
 rG |  SYn X| d k S(   uC   Determine if the specified executable is a .sh (contains a #! line)i   u   #!(   u   openu   readu   closeu   OSErroru   IOError(   u
   executableu   fpu   magic(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   is_sh6  s     	u   is_shc             C   s  g  } d
 } d } d |  k p' d |  k } | r@ | j d ƒ n  x‚ |  D]z } | d k rf | d 7} qG | d k r” | j d | d d ƒ d } qG | r´ | j d | ƒ d } n  | j | ƒ qG W| rß | j d | ƒ n  | r| j d | ƒ | j d ƒ n  d	 j | ƒ S(   u@   Quote a command line argument according to Windows parsing rulesi    u    u   	u   "u   \i   i   u   \"u    F(   u   Falseu   appendu   join(   u   argu   resultu	   needquoteu   nbu   c(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   nt_quote_arg?  s,    		u   nt_quote_argc             C   sb   | j  d ƒ s | j  d ƒ r" d St |  | ƒ r5 d S|  j d ƒ r^ d |  j ƒ  d j ƒ  k Sd S(   uM   Is this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    u   .pyu   .pywu   #!u   pythoni    TF(   u   endswithu   Trueu	   is_pythonu
   startswithu
   splitlinesu   loweru   False(   u   script_textu   filename(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   is_python_script`  s    u   is_python_script(   u   chmodc              G   s   d  S(   N(    (   u   args(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _chmodq  s    u   _chmodc             C   s`   t  j d |  | ƒ y t |  | ƒ Wn5 t j k
 r[ t j ƒ  d } t  j d | ƒ Yn Xd  S(   Nu   changing mode of %s to %oi   u   chmod failed: %s(   u   logu   debugu   _chmodu   osu   erroru   sysu   exc_info(   u   pathu   modeu   e(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   chmods  s    u   chmodc             C   sn   t  j j d ƒ rj t |  ƒ rj d d  l } | j j j d ƒ d k rI |  S| r_ t j	 d ƒ qj d |  Sn  |  S(   Nu   javai    u   os.nameu   Linuxuœ   WARNING: Unable to adapt shebang line for Jython, the following script is NOT executable
         see http://bugs.jython.org/issue1112 for more information.u   /usr/bin/env %s(
   u   sysu   platformu
   startswithu   is_shu   javau   langu   Systemu   getPropertyu   logu   warn(   u
   executableu   optionsu   java(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   fix_jython_executable{  s    
u   fix_jython_executablec             B   sk   |  Ee  Z d  Z d Z e j d ƒ j ƒ  Z e e	 d
 d d „ ƒ Z e d d „  ƒ Z e d d „  ƒ Z d	 S(   u   ScriptWriteru`   
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    u6  
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    c             c   s°   |  j  | ƒ } t | j ƒ  ƒ } t d | | ƒ } xv d D]n } | d } x[ | j | ƒ j ƒ  D]D \ }	 }
 | j t ƒ  } x% | j | |	 | | ƒ D] } | Vq• Wq` Wq: Wd S(   uW   
        Yield write_script() argument tuples for a distribution's entrypoints
        u    u   consoleu   guiu   _scriptsN(   u   consoleu   gui(	   u
   get_writeru   stru   as_requirementu   get_script_headeru   get_entry_mapu   itemsu   templateu   localsu   _get_script_args(   u   clsu   distu
   executableu   wininstu	   gen_classu   specu   headeru   type_u   groupu   nameu   epu   script_textu   res(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_script_args¢  s    
"u   ScriptWriter.get_script_argsc             C   s#   | s t  j d k r t j ƒ  S|  S(   Nu   win32(   u   sysu   platformu   WindowsScriptWriteru
   get_writer(   u   clsu   force_windows(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   get_writer²  s    
u   ScriptWriter.get_writerc             c   s   | | | f Vd  S(   N(    (   u   clsu   type_u   nameu   headeru   script_text(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _get_script_args¸  s    u   ScriptWriter._get_script_argsNF(   u   __name__u
   __module__u   __qualname__u   __doc__u   textwrapu   dedentu   lstripu   templateu   classmethodu   sys_executableu   Falseu   get_script_argsu
   get_writeru   _get_script_args(   u
   __locals__(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   ScriptWriter  s   
u   ScriptWriterc             B   sJ   |  Ee  Z d  Z e d d „  ƒ Z e d d „  ƒ Z e d d „  ƒ Z d S(   u   WindowsScriptWriterc             C   s2   t  d t d |  ƒ } t j j d d ƒ } | | S(   u:   
        Get a script writer suitable for Windows
        u
   executableu   naturalu   SETUPTOOLS_LAUNCHER(   u   dictu   WindowsExecutableLauncherWriteru   osu   environu   get(   u   clsu   writer_lookupu   launcher(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   get_writer¿  s
    	u   WindowsScriptWriter.get_writerc             #   sÂ   t  d d d d ƒ | } | t j d j ƒ  j d ƒ k rR t j d | t ƒ n  d d d	 d
 d d d g } | j | ƒ |  j	 | | ƒ } ‡  f d d †  | Dƒ } ˆ  | | | d | f Vd S(   u    For Windows, add a .py extensionu   consoleu   .pyau   guiu   .pywu   PATHEXTu   ;uH   %s not listed in PATHEXT; scripts will not be recognized as executables.u   .pyu
   -script.pyu   .pycu   .pyou   .exec                s   g  |  ] } ˆ  | ‘ q S(    (    (   u   .0u   x(   u   name(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>Ö  s   	 u8   WindowsScriptWriter._get_script_args.<locals>.<listcomp>u   tN(
   u   dictu   osu   environu   loweru   splitu   warningsu   warnu   UserWarningu   removeu   _adjust_header(   u   clsu   type_u   nameu   headeru   script_textu   extu   oldu   blockers(    (   u   nameu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _get_script_argsÌ  s    "	u$   WindowsScriptWriter._get_script_argsc             C   s¡   d } d } |  d k r( | | } } n  t  j t  j | ƒ t  j ƒ } | j d | d | ƒ } | d d
 … j d ƒ } t j d	 k r t j	 j
 | ƒ r | S| S(   uŠ   
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        u   pythonw.exeu
   python.exeu   guiu   stringu   repli   i   u   "u   win32iÿÿÿÿ(   u   reu   compileu   escapeu
   IGNORECASEu   subu   stripu   sysu   platformu   osu   pathu   exists(   u   type_u   orig_headeru   patternu   replu
   pattern_obu
   new_headeru   clean_header(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _adjust_headerÙ  s    "u"   WindowsScriptWriter._adjust_headerN(   u   __name__u
   __module__u   __qualname__u   classmethodu
   get_writeru   _get_script_argsu   staticmethodu   _adjust_header(   u
   __locals__(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   WindowsScriptWriter¾  s   u   WindowsScriptWriterc             B   s&   |  Ee  Z d  Z e d d „  ƒ Z d S(   u   WindowsExecutableLauncherWriterc             #   sÉ   | d k r$ d } d } d g } n d } d } d d d g } |  j  | | ƒ } ‡  f d	 d
 †  | Dƒ }	 ˆ  | | | d |	 f Vˆ  d t | ƒ d f Vt ƒ  sÅ ˆ  d }
 |
 t ˆ  ƒ d f Vn  d S(   uG   
        For Windows, add a .py extension and an .exe launcher
        u   guiu   -script.pywu   .pywu   cliu
   -script.pyu   .pyu   .pycu   .pyoc                s   g  |  ] } ˆ  | ‘ q S(    (    (   u   .0u   x(   u   name(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   <listcomp>û  s   	 uD   WindowsExecutableLauncherWriter._get_script_args.<locals>.<listcomp>u   tu   .exeu   bu   .exe.manifestN(   u   _adjust_headeru   get_win_launcheru   is_64bitu   load_launcher_manifest(   u   clsu   type_u   nameu   headeru   script_textu   launcher_typeu   extu   oldu   hdru   blockersu   m_name(    (   u   nameu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   _get_script_argsí  s    	
u0   WindowsExecutableLauncherWriter._get_script_argsN(   u   __name__u
   __module__u   __qualname__u   classmethodu   _get_script_args(   u
   __locals__(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   WindowsExecutableLauncherWriterì  s   u   WindowsExecutableLauncherWriterc             C   st   d |  } t  j ƒ  j ƒ  d k r7 | j d d ƒ } n  t ƒ  rU | j d d ƒ } n | j d d ƒ } t d | ƒ S(   u«   
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    u   %s.exeu   armu   .u   -arm.u   -64.u   -32.u
   setuptools(   u   platformu   machineu   loweru   replaceu   is_64bitu   resource_string(   u   typeu   launcher_fn(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   get_win_launcher  s    
	u   get_win_launcherc             C   sH   t  j t d ƒ } t j d d k  r0 | t ƒ  S| j d ƒ t ƒ  Sd  S(   Nu   launcher manifest.xmli    i   u   utf-8(   u   pkg_resourcesu   resource_stringu   __name__u   sysu   version_infou   varsu   decode(   u   nameu   manifest(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   load_launcher_manifest  s    u   load_launcher_manifestc             C   s~  | r d d „  } n | d k r0 d d „  } n  g  } y t j |  ƒ } Wn. t j k
 ry | t j |  t j ƒ  ƒ Yn Xx» | D]³ } t j j |  | ƒ } y t j | ƒ j	 } Wn t j k
 rÏ d } Yn Xt
 j | ƒ rò t | | | ƒ q y t j | ƒ Wq t j k
 r3| t j | t j ƒ  ƒ Yq Xq Wy t j |  ƒ Wn. t j k
 ry| t j |  t j ƒ  ƒ Yn Xd S(   u¡   Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    c              W   s   d  S(   N(    (   u   args(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   onerror,  s    u   rmtree.<locals>.onerrorc              W   s   ‚  d  S(   N(    (   u   args(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   onerror/  s    i    N(   u   Noneu   osu   listdiru   erroru   sysu   exc_infou   pathu   joinu   lstatu   st_modeu   statu   S_ISDIRu   rmtreeu   removeu   rmdir(   u   pathu   ignore_errorsu   onerroru   namesu   nameu   fullnameu   mode(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   rmtree%  s2    "u   rmtreec              C   s    t  j d ƒ }  t  j |  ƒ |  S(   Ni   (   u   osu   umask(   u   tmp(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   current_umaskH  s    u   current_umaskc              C   sM   d d  l  }  t j j |  j d ƒ } | t j d <t j j | ƒ t ƒ  d  S(   Ni    (	   u
   setuptoolsu   osu   pathu   dirnameu   __path__u   sysu   argvu   appendu   main(   u
   setuptoolsu   argv0(    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   bootstrapM  s
    u	   bootstrapc                s½   d d l  m ‰ d d l m ‰  d d  l ‰ d ‰ ‡ f d d †  ‰ ‡ ‡ f d d †  ‰ G‡  ‡ f d	 d
 †  d
 ˆ  ƒ ‰ ˆ d  k rš t j d d  … ‰ n  ˆ ‡ ‡ ‡ ‡ f d d †  ƒ d  S(   Ni    (   u   setup(   u   DistributionuL   usage: %(script)s [options] requirement_or_url ...
   or: %(script)s --help
c                s   ˆ  t  d t j j |  ƒ ƒ S(   Nu   script(   u   dictu   osu   pathu   basename(   u   script_name(   u   USAGE(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu	   gen_usage_  s    	u   main.<locals>.gen_usagec                s7   ˆ  j  j } z ˆ ˆ  j  _ |  ƒ  SWd  | ˆ  j  _ Xd  S(   N(   u   coreu	   gen_usage(   u   fu   old_gen_usage(   u	   distutilsu	   gen_usage(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   with_ei_usaged  s
    u   main.<locals>.with_ei_usagec                s/   |  Ee  Z d  Z d Z ‡  ‡ f d d †  Z d S(   u-   main.<locals>.DistributionWithoutHelpCommandsu    c                s#   ˆ ‡ ‡  ‡ ‡ f d d †  ƒ d  S(   Nc                  s   ˆ  j  ˆ ˆ ˆ Ž S(   N(   u
   _show_help(    (   u   Distributionu   argsu   kwu   self(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   <lambda>p  s    uJ   main.<locals>.DistributionWithoutHelpCommands._show_help.<locals>.<lambda>(    (   u   selfu   argsu   kw(   u   Distributionu   with_ei_usage(   u   argsu   kwu   selfu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu
   _show_helpo  s    u8   main.<locals>.DistributionWithoutHelpCommands._show_helpN(   u   __name__u
   __module__u   __qualname__u   common_usageu
   _show_help(   u
   __locals__(   u   Distributionu   with_ei_usage(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   DistributionWithoutHelpCommandsl  s   u   DistributionWithoutHelpCommandsi   c            	      s6   ˆ d d d d g ˆ d t  j d p) d d ˆ  ˆ  S(   Nu   script_argsu   -qu   easy_installu   -vu   script_namei    u	   distclass(   u   sysu   argv(    (   u   DistributionWithoutHelpCommandsu   argvu   kwu   setup(    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   <lambda>u  s    u   main.<locals>.<lambda>(   u
   setuptoolsu   setupu   setuptools.distu   Distributionu   distutils.coreu   Noneu   sysu   argv(   u   argvu   kw(    (	   u   Distributionu   DistributionWithoutHelpCommandsu   USAGEu   argvu	   distutilsu	   gen_usageu   kwu   setupu   with_ei_usageu8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   mainU  s    (r   u   __doc__u   sysu   osu	   zipimportu   shutilu   tempfileu   zipfileu   reu   statu   randomu   platformu   textwrapu   warningsu   siteu   structu   globu	   distutilsu   logu   dir_utilu   pkg_resourcesu
   setuptoolsu   Commandu   _dont_write_bytecodeu   setuptools.sandboxu	   run_setupu   setuptools.py31compatu   get_pathu   get_config_varsu   distutils.utilu   get_platformu   convert_pathu
   subst_varsu   distutils.errorsu   DistutilsArgErroru   DistutilsOptionErroru   DistutilsErroru   DistutilsPlatformErroru   distutils.command.installu   INSTALL_SCHEMESu   SCHEME_KEYSu   setuptools.commandu   setoptu   setuptools.archive_utilu   unpack_archiveu   setuptools.package_indexu   PackageIndexu
   URL_SCHEMEu	   bdist_eggu   egg_infou   setuptools.compatu	   iteritemsu   maxsizeu
   basestringu   unicodeu   reraiseu   yield_linesu   normalize_pathu   resource_stringu   ensure_directoryu   get_distributionu   find_distributionsu   Environmentu   Requirementu   Distributionu   PathMetadatau   EggMetadatau
   WorkingSetu   DistributionNotFoundu   VersionConflictu   DEVELOP_DISTu   environu   getu   pathu   normpathu
   executableu   sys_executableu   __all__u   is_64bitu   samefileu   version_infou	   _to_asciiu   isasciiu   easy_installu   get_site_dirsu   expand_pathsu   extract_wininst_cfgu   get_exe_prefixesu   parse_requirement_argu   PthDistributionsu   Falseu   get_script_headeru
   auto_chmodu   uncache_zipdiru   _uncacheu	   is_pythonu   is_shu   nt_quote_argu   is_python_scriptu   chmodu   _chmodu   ImportErroru   fix_jython_executableu   objectu   ScriptWriteru   WindowsScriptWriteru   WindowsExecutableLauncherWriteru   get_script_argsu   get_win_launcheru   load_launcher_manifestu   rmtreeu   current_umasku	   bootstrapu   Noneu   main(    (    (    u8   /tmp/pip-k8wh6o-build/setuptools/command/easy_install.pyu   <module>   sš   "(d	ÿ ÿ ÿ ÿ ~.)/&j
		!..	#