???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
Àfc           @@  s  d  Z  d d l m 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 e j d ƒ Z d „  Z d	 „  Z d
 „  Z d „  Z d „  Z e e d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d e d d d d „ Z e ƒ  Z d S(   s2   Generate and work with PEP 425 Compatibility Tags.i    (   t   absolute_importN(   t   OrderedDicti   (   t   glibcs   (.+)_(\d+)_(\d+)_(.+)c         C@  sE   y t  j |  ƒ SWn- t k
 r@ } t j d j | ƒ t ƒ d  SXd  S(   Ns   {}(   t	   sysconfigt   get_config_vart   IOErrort   warningst   warnt   formatt   RuntimeWarningt   None(   t   vart   e(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyR      s
    c          C@  sU   t  t d ƒ r d }  n9 t j j d ƒ r3 d }  n t j d k rK d }  n d }  |  S(   s'   Return abbreviated implementation name.t   pypy_version_infot   ppt   javat   jyt   clit   ipt   cp(   t   hasattrt   syst   platformt
   startswith(   t   pyimpl(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_abbr_impl   s    			c          C@  sD   t  d ƒ }  |  s" t ƒ  d k r@ d j t t t ƒ  ƒ ƒ }  n  |  S(   s   Return implementation version.t   py_version_nodotR   t    (   R   R   t   joint   mapt   strt   get_impl_version_info(   t   impl_ver(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_impl_ver(   s    c           C@  sK   t  ƒ  d k r/ t j d t j j t j j f St j d t j d f Sd S(   sQ   Return sys.version_info-like tuple for use in decrementing the minor
    version.R   i    i   N(   R   R   t   version_infoR   t   majort   minor(    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyR   0   s    c           C@  s   d j  t ƒ  t ƒ  ƒ S(   s;   
    Returns the Tag for this specific implementation.
    s   {}{}(   R   R   R!   (    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_impl_tag;   s    c         C@  sN   t  |  ƒ } | d k rD | r= t j d j |  ƒ t d ƒ n  | ƒ  S| | k S(   sg   Use a fallback method for determining SOABI flags if the needed config
    var is unset or unavailable.s?   Config variable '{0}' is unset, Python ABI tag may be incorrecti   N(   R   R
   R   R   R   R	   (   R   t   fallbackt   expectedR   t   val(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_flagB   s    c       	   @  sm  t  d ƒ }  t ƒ  ‰  |  rˆ  d d h k rt t d ƒ rd } d } d } t d d „  d ˆ  d k ƒrv d	 } n  t d
 ‡  f d †  d ˆ  d k ƒr£ d } n  t d d „  d d d ˆ  d k oÐ t j d k  ƒrî t j d k  rî d } n  d ˆ  t ƒ  | | | f } n\ |  r<|  j d ƒ r<d |  j d ƒ d } n- |  rc|  j	 d d ƒ j	 d d ƒ } n d } | S(   sX   Return the ABI tag based on SOABI (if available) or emulate SOABI
    (CPython 2, PyPy).t   SOABIR   R   t
   maxunicodeR   t   Py_DEBUGc           S@  s   t  t d ƒ S(   Nt   gettotalrefcount(   R   R   (    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   <lambda>X   R   R   t   dt   WITH_PYMALLOCc           @  s
   ˆ  d k S(   NR   (    (    (   t   impl(    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyR.   \   R   t   mt   Py_UNICODE_SIZEc           S@  s   t  j d k S(   Niÿÿ (   R   R+   (    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyR.   `   R   R'   i   i   t   us
   %s%s%s%s%ss   cpython-t   -i   t   .t   _(   i   i   (   i   i   N(   R   R   R   R   R)   R"   R!   R   t   splitt   replaceR
   (   t   soabiR/   R2   R4   t   abi(    (   R1   s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_abi_tagN   s8    	(					!c           C@  s   t  j d k S(   Niÿÿÿ(   R   t   maxsize(    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   _is_running_32bitp   s    c          C@  sÓ   t  j d k rŠ t j ƒ  \ }  } } |  j d ƒ } | d k rQ t ƒ  rQ d } n | d k ro t ƒ  ro d } n  d j | d | d	 | ƒ St j j ƒ  j	 d d
 ƒ j	 d d
 ƒ } | d k rÏ t ƒ  rÏ d } n  | S(   s0   Return our platform name 'win32', 'linux_x86_64't   darwinR6   t   x86_64t   i386t   ppc64t   ppcs   macosx_{}_{}_{}i    i   R7   R5   t   linux_x86_64t
   linux_i686(
   R   R   t   mac_verR8   R>   R   t	   distutilst   utilt   get_platformR9   (   t   releaseR7   t   machinet	   split_vert   result(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyRI   t   s    		'	c          C@  s`   t  ƒ  d d h k r t Sy d d  l }  t |  j ƒ SWn t t f k
 rO n Xt j d d ƒ S(   NRD   RE   i    i   i   (	   RI   t   Falset
   _manylinuxt   boolt   manylinux1_compatiblet   ImportErrort   AttributeErrorR   t   have_compatible_glibc(   RO   (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   is_manylinux1_compatibleŽ   s    c         @  s¾   g  } ‡  ‡ f d †  ‰  t  d d f d d f d d f d	 d f g ƒ ‰ ˆ  |  | | ƒ rj | j | ƒ n  x@ ˆ D]8 } | ˆ | k rq ˆ  |  | | ƒ rq | j | ƒ qq qq W| j d
 ƒ | S(   sŒ   Return a list of supported arches (including group arches) for
    the given major, minor and machine architecture of an macOS machine.
    c         @  s®   | d k r |  | f d k S| d k r8 |  | f d	 k S| d k rT |  | f d
 k S| d k rp |  | f d k S| ˆ k rª x+ ˆ | D] } ˆ  |  | | ƒ r‡ t  Sq‡ Wn  t S(   NRC   i
   i   RB   RA   i   R@   (   i
   i   (   i
   i   (   i
   i   (   i
   i   (   t   TrueRN   (   R#   R$   t   archt   garch(   t   _supports_archt   groups(    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyRY   ¥   s    t   fatRA   RC   t   intelR@   t   fat64RB   t   fat32t	   universal(   RA   RC   (   R@   RA   (   R@   RB   (   R@   RA   RC   (   R   t   append(   R#   R$   RK   t   archesRX   (    (   RY   RZ   s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_darwin_archesŸ   s    $			"c         C@  sí  g  } |  d k ru g  }  t ƒ  } | d  } xG t | d d d ƒ D], } |  j d j t t | | f ƒ ƒ ƒ qB Wn  | p t ƒ  } g  }	 | p– t ƒ  } | r² | g |	 d d +n  t	 ƒ  }
 d d l
 } xK | j ƒ  D]= } | d j d ƒ rÔ |
 j | d j d d ƒ d ƒ qÔ qÔ W|	 j t t |
 ƒ ƒ ƒ |	 j d	 ƒ | s6| pMt ƒ  } | j d
 ƒ rt j | ƒ } | r| j ƒ  \ } } } } d j | | ƒ } g  } xj t t t | ƒ d ƒ ƒ D]@ } x7 t t | ƒ | | ƒ D] } | j | | | f ƒ qàWqÁWqM| g } n9 | d k rDt ƒ  rD| j d d ƒ | g } n	 | g } xC |	 D]; } x2 | D]* } | j d | |  d f | | f ƒ qaWqTWxj |  d D]^ } | d d h k rºPn  x? |
 D]7 } x. | D]& } | j d | | f | | f ƒ qÎWqÁWqžWx3 | D]( } | j d |  d d d	 | f ƒ qWn  | j d | |  d f d	 d f ƒ | j d | |  d d f d	 d f ƒ xd t |  ƒ D]V \ } } | j d | f d	 d f ƒ | d k r| j d | d d	 d f ƒ qqW| S(   sc  Return a list of supported tags for each version specified in
    `versions`.

    :param versions: a list of string versions, of the form ["33", "32"],
        or None. The first version will be assumed to support our ABI.
    :param platform: specify the exact platform you want valid
        tags for, or None. If None, use the local system platform.
    :param impl: specify the exact implementation you want valid
        tags for, or None. If None, use the local interpreter impl.
    :param abi: specify the exact abi you want valid
        tags for, or None. If None, use the local interpreter abi.
    iÿÿÿÿR   i    Ns   .abiR6   i   i   t   nonet   macosxs   {}_{}_%i_%st   linuxt
   manylinux1s   %s%st   31t   30s   py%st   any(   R
   R   t   rangeR`   R   R   R   R   R<   t   sett   impt   get_suffixesR   t   addR8   t   extendt   sortedt   listRI   t   _osx_arch_patt   matchRZ   R   t   reversedt   intRb   RU   R9   t	   enumerate(   t   versionst   noarchR   R1   R;   t	   supportedR"   R#   R$   t   abist   abi3sRl   t   suffixRW   Rs   t   namet   actual_archt   tplRa   R2   t   at   versiont   i(    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   get_supportedÜ   sh    	
-	(#"	,,)$(%(    t   __doc__t
   __future__R    t   distutils.utilRG   R   t   reR   R   R   t   collectionsR   R   R   t   compileRr   R   R   R!   R   R%   RV   R)   R<   R>   RI   RU   Rb   R
   RN   Rƒ   t   implementation_tag(    (    (    s9   /usr/lib/python2.7/site-packages/setuptools/pep425tags.pyt   <module>   s0   						"				=	_