ó
£įSc        "   @` s  d  d l  m Z m Z m Z d  d l Z d  d l m Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 m Z d Z d Z d e f d     YZ d	   Z d
   Z d   Z d d d d d d d d d d d d d d d d d d d d g Z d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ g Z d0 d1 g Z dw dx dy dz d{ d| d} d~ g Z d g Z d  d! d" d$ d# d) d, d. d/ g	 Z d d d d d d d d d d% d& d d d d! d d  d d d d# d" d$ d) d* d+ d d d d d' d( d, d- g" Z g  e D] Z e dA ^ qčZ g  e D] Z e dB ^ qZ dC dD dE g Z dF dG dH dI dJ dK dL dM dN dO g
 Z dP   Z dQ   Z  dR   Z! dS   Z" dT Z# dU   Z$ dV dV dV dV dV dV dV dV dW dX dY dZ d[ d\ d] d^ g Z% d_ d` da db dc dd de df g Z& dg dh di dj dd dV dV dV g Z' e' d d dk  Z( dV dV dV dV dl dm dn do dp dq dV dV g Z) dV dV dV dV dl dm dn do dp dq dV dV dV dV dV dV g Z* dq dp dV dV do dn dm dl dV dV dV dV g Z+ dq dp dr ds dY dt dV dV dV dV dV dV dV dV dV dV g Z, e, d d dk  Z- dg dh di dj dd dV dV dV g dV g du Z. dv   Z/ d S(   i    (   t   divisiont   absolute_importt   print_functionN(   t   join(   t   CompileErrori	  i	   t   MismatchCAPIWarningc           B` s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyR   '   s   c         C` sf   d d l  m } |  j d  } | d k r: t d   n  | d |  j } t |  d k rb t St S(   s7   Return True if a released version of numpy is detected.i    (   t   LooseVersions   ../version.pys   Could not get versiont   vstringi   N(	   t   distutils.versionR   t   get_versiont   Nonet
   ValueErrort   versiont   lent   Falset   True(   t   configR   t   vt   pv(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   is_released*   s    c         C` s   t  | d  t  | d  g } t j j d |  z: t d  } t d  } | j | j  } | j   } Wd t j d =X| | |  f S(   sg   Return current C API checksum and the recorded checksum for the given
    version of the C API version.s   numpy_api_order.txts   ufunc_api_order.txti    t   genapit	   numpy_apiN(   R   t   syst   patht   insertt
   __import__t   fullapi_hasht   full_apit   get_versions_hash(   t
   apiversiont   codegen_dirt	   api_filest   mR   t   curapi_hasht	   apis_hash(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   get_api_versions6   s    c         C` sQ   t  |  |  \ } } | | k sM d } t j | |  | |  | t f t  n  d S(   s@   Emits a MismacthCAPIWarning if the C API version needs updating.s  API mismatch detected, the C API version numbers have to be updated. Current C api version is %d, with checksum %s, but recorded checksum for C API version %d in codegen_dir/cversions.txt is %s. If functions were added in the C API, you have to update C_API_VERSION  in %s.N(   R%   t   warningst   warnt   __file__R   (   R   R    R#   t   api_hasht   msg(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   check_api_versionI   s    t   sint   cost   tant   sinht   cosht   tanht   fabst   floort   ceilt   sqrtt   log10t   logt   expt   asint   acost   atant   fmodt   modft   frexpt   ldexpt   expm1t   log1pt   acosht   asinht   atanht   rintt   trunct   exp2t   log2t   hypott   atan2t   powt   copysignt	   nextaftert   ftellot   fseekos   xmmintrin.hs   emmintrin.ht   __builtin_isnans   5.t   __builtin_isinft   __builtin_isfinitet   __builtin_bswap32t   5ut   __builtin_bswap64t   __builtin_expects   5, 0t   _mm_load_pss	   (float*)0t   _mm_load_pds
   (double*)0s)   __attribute__((optimize("unroll-loops")))t   attribute_optimize_unroll_loopst   ft   ls   complex doubles   complex floats   complex long doublet   crealt   cimagt   cabst   cargt   cexpt   csqrtt   clogt   ccost   csint   cpowc         C` s   d |  j    S(   Ns   HAVE_%s(   t   upper(   t   name(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt	   fname2def   s    c         C` s   |  j  d d  } | j   S(   Nt    t    (   t   replaceRf   (   t   symbolt   define(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   sym2def   s    c         C` s   |  j  d d  } | j   S(   NRi   t   _(   Rk   Rf   (   Rl   Rm   (    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   type2def   s    c         C` se   |  j    t i d d 6} |  j | d  d  d  \ } } z t t |   } | SWd  |  j   Xd  S(   Ns   long doublet   typet   c(   t   _check_compilert   LONG_DOUBLE_REPRESENTATION_SRCt   _compileR   t   long_double_representationt   pyodt   _clean(   t   cmdt   bodyt   srct   objectRq   (    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt    check_long_double_representation”   s    
sA  
/* "before" is 16 bytes to ensure there's no padding between it and "x".
 *    We're not expecting any "long double" bigger than 16 bytes or with
 *       alignment requirements stricter than 16 bytes.  */
typedef %(type)s test_type;

struct {
        char         before[16];
        test_type    x;
        char         after[8];
} foo = {
        { '\0', '\0', '\0', '\0', '\0', '\0', '\0', '\0',
          '\001', '\043', '\105', '\147', '\211', '\253', '\315', '\357' },
        -123456789.0,
        { '\376', '\334', '\272', '\230', '\166', '\124', '\062', '\020' }
};
c         ` sC     f d   }   f d   } t  j d d k  r8 |   S|   Sd S(   s”  Python implementation of the od UNIX utility (od -b, more exactly).

    Parameters
    ----------
    filename : str
        name of the file to get the dump from.

    Returns
    -------
    out : seq
        list of lines of od output

    Note
    ----
    We only implement enough to get the necessary information for long double
    representation, this is not intended as a compatible replacement for od.
    c          ` sķ   g  }  t    d  } zĘ g  | j   D]* } t t t t j |  d    ^ q% } x~ t d t |  d  D]d } d t t |   g } | j g  | | | d !D] } d | ^ q„  |  j	 d j
 |   qn W|  SWd  | j   Xd  S(   Nt   rbi   i    s   %07ds   %03dRi   (   t   opent   readt   intt   octt   binasciit   b2a_hext   rangeR   t   extendt   appendR   t   close(   t   outt   fidt   ot   yot   it   lineRr   (   t   filename(    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   _pyod2Ń   s    =/c          ` sć   g  }  t    d  } z¼ g  | j   D] } t |  d ^ q% } x t d t |  d  D]n } d t t |  d  g } | j g  | | | d !D] } d t |  ^ q  |  j d j |   qZ W|  SWd  | j	   Xd  S(   NR~   i   i    i   s   %07ds   %03dRi   (
   R   R   R   R   R   R   R   R   R   R   (   R   R   R   t   yo2R   R   Rr   (   R   (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   _pyod3ß   s    )5i    i   N(   R   t   version_info(   R   R   R   (    (   R   sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyRw   æ   s
    t   000t   001t   043t   105t   147t   211t   253t   315t   357t   376t   334t   272t   230t   166t   124t   062t   020t   301t   235t   157t   064i’’’’t   240t   242t   171t   353t   031t   300t   326t   363t   100i   c         C` s§  d g d } d } x^|  D]V} xM| j   d D];} | j d  | j |  | d t k r1 t j |  } | d  t d k rµ | d d !t k r d S| d d !t k rid	 Sql| d
  t d
 k r(| d
 d !t	 k rą d S| d
 d !t
 k r÷ d S| d
 d !t k rd S| d
 d !t k rid Sql| d  t k rl| d d !t k rOd S| d d !t k rid Sqlq1 q1 Wq W| d k	 rt d |   n t d |   d S(   sS   Given a binary dump as given by GNU od -b, look for long double
    representation.Rj   i    i   i    ių’’’i   i   t   INTEL_EXTENDED_12_BYTES_LEt   MOTOROLA_EXTENDED_12_BYTES_BEi   t   INTEL_EXTENDED_16_BYTES_LEt   IEEE_QUAD_BEt   IEEE_QUAD_LEt   DOUBLE_DOUBLE_BEi   t   IEEE_DOUBLE_LEt   IEEE_DOUBLE_BEs   Unrecognized format (%s)s   Could not lock sequences (%s)N(   R   t   splitt   popR   t
   _AFTER_SEQt   copyt   _BEFORE_SEQt   _INTEL_EXTENDED_12Bt   _MOTOROLA_EXTENDED_12Bt   _INTEL_EXTENDED_16Bt   _IEEE_QUAD_PREC_BEt   _IEEE_QUAD_PREC_LEt   _DOUBLE_DOUBLE_BEt   _IEEE_DOUBLE_LEt   _IEEE_DOUBLE_BER   (   t   linesR   t   sawR   t   w(    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyRv     s<    (   s   __builtin_isnans   5.(   s   __builtin_isinfs   5.(   s   __builtin_isfinites   5.(   s   __builtin_bswap32s   5u(   s   __builtin_bswap64s   5u(   s   __builtin_expects   5, 0(   s   _mm_load_pss	   (float*)0s   xmmintrin.h(   s   _mm_load_pds
   (double*)0s   emmintrin.h(   s)   __attribute__((optimize("unroll-loops")))s   attribute_optimize_unroll_loops(0   t
   __future__R    R   R   R   t   os.pathR   R&   R½   R   t   distutils.ccompilerR   t   C_ABI_VERSIONt   C_API_VERSIONt   WarningR   R   R%   R+   t   MANDATORY_FUNCSt   OPTIONAL_STDFUNCSt   OPTIONAL_HEADERSt   OPTIONAL_INTRINSICSt   OPTIONAL_GCC_ATTRIBUTESt   OPTIONAL_STDFUNCS_MAYBEt	   C99_FUNCSRZ   t   C99_FUNCS_SINGLEt   C99_FUNCS_EXTENDEDt   C99_COMPLEX_TYPESt   C99_COMPLEX_FUNCSRh   Rn   Rp   R}   Rt   Rw   R¾   R¼   RĘ   RÅ   Ræ   RĮ   RĄ   RĀ   RĆ   RÄ   Rv   (    (    (    sQ   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/core/setup_common.pyt   <module>   s   					 						3