ó
%}Xc           @   s­   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	 d   Z
 e
 Z e	 e j j  Z d e f d     YZ d e f d	     YZ d S(
   i˙˙˙˙N(   t   mapi   (   t   get_unpatchedc          C   s<   d }  y t  |  d d g j t SWn t k
 r7 n Xt S(   s0   
    Return True if Cython can be imported.
    s   Cython.Distutils.build_extt   fromlistt	   build_ext(   t
   __import__R   t   Truet	   Exceptiont   False(   t   cython_impl(    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyt   _have_cython   s    t	   Extensionc           B   s    e  Z d  Z d   Z d   Z RS(   s7   Extension that uses '.c' files in place of '.pyx' filesc         O   s2   | j  d t  |  _ t j |  | | | |  d  S(   Nt   py_limited_api(   t   popR   R   t
   _Extensiont   __init__(   t   selft   namet   sourcest   argst   kw(    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyR   #   s    c         C   sq   t    r d S|  j p d } | j   d k r4 d n d } t j t j d |  } t t | |  j	   |  _	 d S(   sÜ   
        Replace sources with .pyx extensions to sources with the target
        language extension. This mechanism allows language authors to supply
        pre-converted sources but to prefer the .pyx sources.
        Nt    s   c++s   .cpps   .cs   .pyx$(
   R	   t   languaget   lowert	   functoolst   partialt   ret   subt   listR    R   (   R   t   langt
   target_extR   (    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyt   _convert_pyx_sources_to_lang)   s    	(   t   __name__t
   __module__t   __doc__R   R   (    (    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyR
       s   	t   Libraryc           B   s   e  Z d  Z RS(   s=   Just like a regular Extension, but built as a library instead(   R   R    R!   (    (    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyR"   8   s   (   R   R   t   distutils.coret	   distutilst   distutils.errorst   distutils.extensiont   setuptools.extern.six.movesR    t   monkeyR   R	   t
   have_pyrext   coreR
   R   R"   (    (    (    s8   /usr/lib/python2.7/dist-packages/setuptools/extension.pyt   <module>   s   	