Ñò
ƒ‹Kc        
   @   s´   d  Z  d d k Z d d k Z d d k Z d d k Z d d k Z d d k l Z l Z l	 Z	 d d k
 l Z d e f d „  ƒ  YZ d e i Z d Z d	 e i f d
 „  ƒ  YZ d S(   s   Easy install Tests
iÿÿÿÿN(   t   easy_installt   get_script_argst   main(   t   Distributiont   FakeDistc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s   | d j o h  Sh d d 6S(   Nt   console_scriptst   ept   name(    (   t   selft   group(    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   get_entry_map	   s    c         C   s   d S(   Nt   spec(    (   R   (    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   as_requirement   s    (   t   __name__t
   __module__R
   R   (    (    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyR      s   	sü   #!%s
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('spec', 'console_scripts', 'name')()
    )
s0   from setuptools import setup

setup(name='foo')
t   TestEasyInstallTestc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   s„   t  ƒ  } t | ƒ } t | _ t i ƒ  | _ z? | i ƒ  t i	 i
 | i d ƒ } |  i t i	 i | ƒ ƒ Wd  t i | i ƒ Xd  S(   Ns   site.py(   R   R    t   Falset   sitepy_installedt   tempfilet   mkdtempt   install_dirt   install_site_pyt   ost   patht   joint   assert_t   existst   shutilt   rmtree(   R   t   distt   cmdt   sitepy(    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   test_install_site_py&   s    		
c         C   sO   t  ƒ  } t i } z t | ƒ i ƒ  \ } } Wd  | t _ X|  i | t ƒ d  S(   N(   R   t   syst   platformR   t   nextt   assertEqualst   WANTED(   R   R   t   old_platformR   t   script(    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   test_get_script_args2   s    		
c         C   sí   t  i ƒ  } t t i i | d ƒ d ƒ } | i d ƒ | i ƒ  t t i i | d ƒ d ƒ } | i t ƒ | i ƒ  d d k	 l
 } d „  } | i | _ | | _ t i ƒ  } z t i | ƒ t g  ƒ Wd  t i | ƒ t i | ƒ Xd  S(   Ns	   setup.cfgt   ws.   [easy_install]
find_links = http://example.coms   setup.pyiÿÿÿÿ(   R   c         S   sB   d } |  i  } d | j o d | d j p
 t | ‚ n |  i S(   Ns!   Error: a local setup.cfg was usedR    t
   find_links(   t   command_optionst   AssertionErrort   _old_parse_command_line(   R   t   msgt   opts(    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   _parse_command_lineK   s
    	(   R   R   t   openR   R   R   t   writet   closet   SETUP_PYt   setuptools.distR   t   parse_command_lineR-   t   getcwdt   chdirR   R   R   (   R   t   dirt	   setup_cfgt   setup_pyR   R0   t   old_wd(    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   test_no_setup_cfg=   s"    

		(   R   R   R    R(   R=   (    (    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyR   $   s   		(   t   __doc__R!   R   R   R   t   unittestt   setuptools.command.easy_installR    R   R   R5   R   t   objectR   t
   executableR%   R4   t   TestCaseR   (    (    (    sF   /usr/lib/python2.6/dist-packages/setuptools/tests/test_easy_install.pyt   <module>   s   0