Ńň
6ťUc           @   sN   y d  d k  Z Wn e j
 o n Xe   Z d   Z d   Z d   Z d S(   i˙˙˙˙Nc           C   sS   d t    j o d St o d St i t t i   t t i _ t t i _ d S(   sĘ   
    Patch functions in distutils.msvc9compiler to use the standalone compiler
    build for Python (Windows only). Fall back to original behavior when the
    standalone compiler is not available.
    t	   distutilsN(   t   globalst	   unpatchedt   updatet   varsR    t   msvc9compilert   find_vcvarsallt   query_vcvarsall(    (    (    s<   /usr/lib/python2.6/site-packages/setuptools/msvc9_support.pyt   patch_for_specialized_compiler   s    c         C   sâ   t  i i } d } | d |  f } y | i | d  } WnU t j
 oI y& | d |  f } | i | d  } Wq t j
 o d  } q Xn X| o= d d  k } | i i | d  } | i i	 |  o | Sn t
 d |   S(   Ns-   Software\%sMicrosoft\DevDiv\VCForPython\%0.1ft    t
   installdirs   Wow6432Node\i˙˙˙˙s   vcvarsall.batR   (   R    R   t   Regt	   get_valuet   KeyErrort   Nonet   ost   patht   joint   isfileR   (   t   versionR   t   VC_BASEt   keyt
   productdirR   t	   vcvarsall(    (    s<   /usr/lib/python2.6/site-packages/setuptools/msvc9_support.pyR      s"    	c         O   s˛   y t  d |  | |  SWn t i i j
 o } | on d | i d j oZ d |  | i d f } t |   d j o t i i | d   n t i i |   n   n Xd  S(   NR   s   vcvarsall.bati    s,   Microsoft Visual C++ %0.1f is required (%s).i	   s%    Get it from http://aka.ms/vcpython27(   R   R    t   errorst   DistutilsPlatformErrort   argst   int(   R   R   t   kwargst   exct   message(    (    s<   /usr/lib/python2.6/site-packages/setuptools/msvc9_support.pyR   2   s    	(   t   distutils.msvc9compilerR    t   ImportErrort   dictR   R   R   R   (    (    (    s<   /usr/lib/python2.6/site-packages/setuptools/msvc9_support.pyt   <module>   s   			