;ς
r*<Cc           @   s]  d  Z  d k Z d Z d e i d  Z h  d d <d d <d	 d
 <d d <d d <d d <d d <d d <d d <d d <d d <d d <Z d k Z d k Z d   Z e e e i d d  Z	 e e e i d d   Z
 e d!  Z d"   Z e d# j oT e e i  d$ j o e i d% d& j o e e i d$  qYe e i d%  n d S('   s
  Bootstrap setuptools installation

If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::

    from ez_setup import use_setuptools
    use_setuptools()

If you want to require a specific version of setuptools, set a download
mirror, or use an alternate download directory, you can do so by supplying
the appropriate options to ``use_setuptools()``.

This file can also be run as a script to install or upgrade setuptools.
Ns   0.6a5s6   http://cheeseshop.python.org/packages/%s/s/setuptools/i   s   setuptools-0.5a13-py2.3.eggs    85edcf0ef39bab66e130d3f38f578c86s   setuptools-0.5a13-py2.4.eggs    ede4be600e3890e06d4ee5e0148e092as   setuptools-0.6a1-py2.3.eggs    ee819a13b924d9696b0d6ca6d1c5833ds   setuptools-0.6a1-py2.4.eggs    8256b5f1cd9e348ea6877b5ddd56257ds   setuptools-0.6a2-py2.3.eggs    b98da449da411267c37a738f0ab625bas   setuptools-0.6a2-py2.4.eggs    be5b88bc30aed63fdefd2683be135c3bs   setuptools-0.6a3-py2.3.eggs    ee0e325de78f23aab79d33106dc2a8c8s   setuptools-0.6a3-py2.4.eggs    d95453d525a456d6c23e7a5eea89a063s   setuptools-0.6a4-py2.3.eggs    e958cbed4623bbf47dd1f268b99d7784s   setuptools-0.6a4-py2.4.eggs    7f33c3ac2ef1296f0ab4fac1de4767d8s   setuptools-0.6a5-py2.3.eggs    748408389c49bcd2d84f6ae0b01695b1s   setuptools-0.6a5-py2.4.eggs    999bacde623f4284bfb3ea77941d2627c         C   sk   |  t j oV d k l } | |  i   } | t |  j o" t i d |  IJt i d  qc n | Sd  S(   N(   s   md5s:   md5 validation of %s failed!  (Possible download problem?)i   (	   s   egg_names   md5_datas   md5s   datas	   hexdigests   digests   syss   stderrs   exit(   s   egg_names   datas   digests   md5(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys   _validate_md5%   s    i   c         C   sδ   y; d k  } | i d j o t i d IJt i d  n WnM t j
 oA t |  | | |  } t i i d |  d k  } | | _ n Xd k } y | i d |   Wn4 | i j
 o% t i d |  IJt i d  n Xd S(   s‘  Automatically find/download setuptools and make it available on sys.path

    `version` should be a valid setuptools version number that is available
    as an egg for download under the `download_base` URL (which should end with
    a '/').  `to_dir` is the directory where setuptools will be downloaded, if
    it is not already available.  If `download_delay` is specified, it should
    be the number of seconds that will be paused before initiating a download,
    should one be required.  If an older version of setuptools is installed,
    this routine will print a message to ``sys.stderr`` and raise SystemExit in
    an attempt to abort the calling script.  
    Ns   0.0.1s   You have an obsolete version of setuptools installed.  Please
remove it from your system entirely before rerunning this script.i   i    s   setuptools>=s   The required version of setuptools (>=%s) is not available, and
can't be installed while this script is running. Please install
 a more recent version first.(   s
   setuptoolss   __version__s   syss   stderrs   exits   ImportErrors   download_setuptoolss   versions   download_bases   to_dirs   download_delays   eggs   paths   inserts   bootstrap_install_froms   pkg_resourcess   requires   VersionConflict(   s   versions   download_bases   to_dirs   download_delays   pkg_resourcess
   setuptoolss   egg(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys   use_setuptools2   s      		c         C   sE  d k  }	 d k } d |  t i d  f } | | } t i i	 | |  }
 t } } t i i |
  oΛ z d k l } | o1 | i d |  | |  d k l } | |  n | i d |  |	 i |  } t | | i    } t |
 d  } | i |  Wd | o | i   n | o | i   n Xn t i i |
  Sd S(	   s  Download setuptools from a specified location and return its filename

    `version` should be a valid setuptools version number that is available
    as an egg for download under the `download_base` URL (which should end
    with a '/'). `to_dir` is the directory where the egg will be downloaded.
    `delay` is the number of seconds to pause before an actual download attempt.
    Ns   setuptools-%s-py%s.eggi   (   s   logs  
---------------------------------------------------------------------------
This script requires setuptools version %s to run (even to display
help).  I will attempt to download it for you (from
%s), but
you may need to enable firewall access for this script first.
I will start the download in %d seconds.
---------------------------------------------------------------------------(   s   sleeps   Downloading %ss   wb(   s   urllib2s   shutils   versions   syss   egg_names   download_bases   urls   oss   paths   joins   to_dirs   savetos   Nones   srcs   dsts   existss	   distutilss   logs   delays   warns   times   sleeps   urlopens   _validate_md5s   reads   datas   opens   writes   closes   realpath(   s   versions   download_bases   to_dirs   delays   logs   srcs   urls   datas   dsts   urllib2s   savetos   sleeps   shutils   egg_name(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys   download_setuptools[   s,    
 

	(    c   
      C   s  y d k  } Wn t j
 o d k } d k } | i d d  }	 zS t | d |	 d d } t	 i
 i d |  d k l } | t |   | g  Wd | i |	  Xn  X| i d j o t |  n d	 | } d k } y | i |  Wnw | i j
 oh y d k l } Wn  t j
 o d k l } n X| t |   t d d  g  t	 i d  n6 X|  o d k l } | |   n d
 G| Gd GHd GHd S(   s-   Install or upgrade setuptools and EasyInstallNs   prefixs   easy_install-s   to_dirs   delayi    (   s   mains   0.0.1s   setuptools>=s   Setuptools versions   or greater has been installed.s:   (Run "ez_setup.py -U setuptools" to reinstall or upgrade.)(   s
   setuptoolss   ImportErrors   tempfiles   shutils   mkdtemps   tmpdirs   download_setuptoolss   versions   eggs   syss   paths   inserts   setuptools.command.easy_installs   mains   lists   argvs   rmtrees   __version__s   use_setuptoolss   reqs   pkg_resourcess   requires   VersionConflicts   easy_installs   exit(
   s   argvs   versions   mains   reqs   pkg_resourcess   tempfiles
   setuptoolss   shutils   eggs   tmpdir(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys   main   s>      
	 c         C   s  d k  } d k l } xU |  D]M } t i i |  } t | d  } | | i
    i   t | <| i   q Wg  i } t i   D] } | d |  q ~ }	 |	 i   d i |	  } d k } | i t i t  }
 t |
 d  } | i
   } | i   | i d |  } | o t i d IJt i  d  n | | i! d	   | | | i" d	  } t |
 d
  } | i# |  | i   d S(   s    Update our built-in md5 registryN(   s   md5s   rbs       %r: %r,
s    s   
md5_data = {
([^}]+)}s   Internal error!i   i   s   w($   s   res   md5s	   filenamess   names   oss   paths   basenames   bases   opens   fs   reads	   hexdigests   md5_datas   closes   appends   _[1]s   itemss   its   datas   sorts   joins   repls   inspects   getsourcefiles   syss   moduless   __name__s   srcfiles   srcs   searchs   matchs   stderrs   exits   starts   ends   write(   s	   filenamess   repls   names   fs   inspects   its   _[1]s   res   bases   datas   srcfiles   srcs   matchs   md5(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys
   update_md5­   s.     	 1
	%(s   __main__i   i   s   --md5update(   s   __doc__s   syss   DEFAULT_VERSIONs   versions   DEFAULT_URLs   md5_datas   oss   _validate_md5s   curdirs   use_setuptoolss   download_setuptoolss   mains
   update_md5s   __name__s   lens   argv(
   s   DEFAULT_VERSIONs
   update_md5s   syss   md5_datas   _validate_md5s   DEFAULT_URLs   download_setuptoolss   mains   oss   use_setuptools(    (    sf   /home/kov/debian/python-modules/external/ruledispatch/python-ruledispatch-0.5adev/ez_setup/__init__.pys   ?   s   	r	)))	*