
ĴZc           @   s  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z i d d 6d d 6d d 6d d	 6d d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6Z iZ d d! 6d" d# 6d$ d% 6d& d' 6d d( 6d d) 6d* d+ 6d d, 6d d- 6d d. 6d d/ 6d d0 6d d1 6d2 d3 6d d4 6d d5 6d6 d7 6d d8 6d d9 6d: d; 6d< d= 6d> d? 6d@ dA 6dB dC 6dD dE 6dF dG 6d& dH 6d dI 6d dJ 6d* dK 6d dL 6d dM 6d dN 6d dO 6d dP 6d dQ 6d2 dR 6d dS 6d dT 6d6 dU 6d dV 6d dW 6d: dX 6d< dY 6d> dZ 6d d[ 6d\ d] 6d d^ 6d d_ 6d d` 6da db 6da dc 6d dd 6d de 6d df 6d dg 6d dh 6d di 6dj dk 6d dl 6d dm 6dj dn 6do dp 6d dq 6d dr 6d ds 6d dt 6d du 6dv dw 6dv dx 6d dy 6d dz 6d d{ 6d d| 6d d} 6d~ d 6d d 6d d 6d d 6d d 6d d 6d d 6dF d 6dF d 6d d 6d d 6d d 6d d 6d d 6d d 6Z g  a d e f d     YZ	 d f  d     YZ
 d f  d     YZ d f  d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d   Z d d  Z d   Z e e d  Z e d  Z e d  Z d   Z d   Z d   Z d d d  Z e e d  Z d   Z d d d  Z d S(   iNt    t   archs  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bint   default_bin_dirs  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python2.7/site-packagest   default_mod_dirs	  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/share/sipt   default_sip_dirt   deployment_targets	   linux-g++t   platforms  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/include/python2.7t   py_conf_inc_dirt
   py_inc_dirs  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python2.7/configt
   py_lib_diri t
   py_versioni    t   qt_frameworks  /opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bin/sipt   sip_bins	  --sysroot=/opt/conda/conda-bld/sip_1521796086977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeholdt   sip_config_argst   sip_inc_dirt   sip_mod_diri t   sip_versions   4.19.8t   sip_version_strt	   universalt	   AIX_SHLIBs   ar cqst   ARt   gcct   CCs   -pipet   CFLAGSt
   CFLAGS_APPt   CFLAGS_CONSOLEs   -gt   CFLAGS_DEBUGt   CFLAGS_EXCEPTIONS_OFFt   CFLAGS_EXCEPTIONS_ONt	   CFLAGS_MTt   CFLAGS_MT_DBGt   CFLAGS_MT_DLLt   CFLAGS_MT_DLLDBGs   -O2t   CFLAGS_RELEASEt   CFLAGS_RTTI_OFFt   CFLAGS_RTTI_ONs   -fPICt   CFLAGS_SHLIBt   CFLAGS_STL_OFFt   CFLAGS_STL_ONs   -D_REENTRANTt   CFLAGS_THREADs   -wt   CFLAGS_WARN_OFFs   -Wall -Wt   CFLAGS_WARN_ONs   test -dt   CHK_DIR_EXISTSs'   qt warn_on release incremental link_prlt   CONFIGs   cp -ft   COPYs   g++t   CXXt   CXXFLAGSt   CXXFLAGS_APPt   CXXFLAGS_CONSOLEt   CXXFLAGS_DEBUGt   CXXFLAGS_EXCEPTIONS_OFFt   CXXFLAGS_EXCEPTIONS_ONt   CXXFLAGS_MTt   CXXFLAGS_MT_DBGt   CXXFLAGS_MT_DLLt   CXXFLAGS_MT_DLLDBGt   CXXFLAGS_RELEASEt   CXXFLAGS_RTTI_OFFt   CXXFLAGS_RTTI_ONt   CXXFLAGS_SHLIBt   CXXFLAGS_STL_OFFt   CXXFLAGS_STL_ONt   CXXFLAGS_THREADt   CXXFLAGS_WARN_OFFt   CXXFLAGS_WARN_ONt   DEFINESs   rm -ft   DEL_FILEt   EXTENSION_PLUGINt   EXTENSION_SHLIBt   INCDIRs   /usr/X11R6/includet   INCDIR_OPENGLt
   INCDIR_X11t   LFLAGSt   LFLAGS_CONSOLEt   LFLAGS_CONSOLE_DLLt   LFLAGS_DEBUGt
   LFLAGS_DLLt   LFLAGS_OPENGLs   -sharedt   LFLAGS_PLUGINt   LFLAGS_RELEASEt   LFLAGS_RPATHt   LFLAGS_SHLIBs   -Wl,-soname,t   LFLAGS_SONAMEt   LFLAGS_THREADt   LFLAGS_WINDOWSt   LFLAGS_WINDOWS_DLLt   LIBt   LIBDIRs   /usr/X11R6/libt   LIBDIR_OPENGLt
   LIBDIR_X11t   LIBSt   LIBS_CONSOLEt	   LIBS_COREt   LIBS_GUIt   LIBS_NETWORKs
   -lGLU -lGLt   LIBS_OPENGLt   LIBS_RTt	   LIBS_RTMTs	   -lpthreadt   LIBS_THREADt   LIBS_WEBKITt   LIBS_WINDOWSs   -lXext -lX11 -lmt   LIBS_X11t   LINKt
   LINK_SHLIBt   LINK_SHLIB_CMDt   UNIXt   MAKEFILE_GENERATORs   mkdir -pt   MKDIRt   RANLIBs   -Wl,-rpath,t   RPATHt   stript   STRIPt   Configurationc           B   s5   e  Z d  Z d d  Z d   Z d   Z d   Z RS(   s8   The class that represents SIP configuration values.
    c         C   s   d |  _ xU |  j j D]G } | t k r. q n  t j | j } t | d  r | j	 |  _ Pq q W| rp | } n g  } | j
 t  | a d S(   s   Initialise an instance of the class.

        sub_cfg is the list of sub-class configurations.  It should be None
        when called normally.
        t   _default_macrosN(   t   Nonet   _macrost	   __class__t   __mro__t   objectt   syst   modulest
   __module__t   hasattrRq   t   appendt   _pkg_configt   _config_stack(   t   selft   sub_cfgt   clst   modt   cfg(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   __init__   s    		c         C   sE   x. t  D]& } y | | SWq t k
 r, q Xq Wt d |   d S(   s   Allow configuration values and user options to be handled as
        instance variables.

        name is the name of the configuration value or user option.
        s6   "%s" is not a valid configuration value or user optionN(   R}   t   KeyErrort   AttributeError(   R~   t   nameR   (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   __getattr__   s    c         C   s   |  j  S(   sA   Return the dictionary of platform specific build macros.
        (   Rs   (   R~   (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   build_macros   s    c         C   s   | |  _  d S(   s   Set the dictionary of build macros to be use when generating
        Makefiles.

        macros is the dictionary of platform specific build macros.
        N(   Rs   (   R~   t   macros(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   set_build_macros   s    N(   t   __name__Ry   t   __doc__Rr   R   R   R   R   (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyRp      s
   		t   _UniqueListc           B   s>   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z RS(   s=   A limited list that ensures all its elements are unique.
    c         C   s%   | d k r g  |  _ n	 | |  _ d S(   sR   Initialise the instance.

        value is the initial value of the list.
        N(   Rr   t   _list(   R~   t   value(    (    s(   lib/python2.7/site-packages/sipconfig.pyR      s    c         C   s&   | |  j  k r" |  j  j |  n  d S(   sg   Append a value to the list if it isn't already present.

        value is the value to append.
        N(   R   R{   (   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR{      s    c         C   s   |  j  j |  d S(   sh   A normal list extend ignoring the uniqueness.

        value is the list of elements to append.
        N(   R   t   extend(   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   lextend   s    c         C   s"   x | D] } |  j  |  q Wd S(   s   Append each element of a value to a list if it isn't already
        present.

        value is the list of elements to append.
        N(   R{   (   R~   R   t   el(    (    s(   lib/python2.7/site-packages/sipconfig.pyR      s    c         C   s   |  j  S(   s'   Return the list as a raw list.
        (   R   (   R~   (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   as_list   s    N(	   R   Ry   R   Rr   R   R{   R   R   R   (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR      s   
				t   _Macroc           B   sD   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   s/   A macro that can be manipulated as a list.
    c         C   s   | |  _  |  j |  d S(   sz   Initialise the instance.

        name is the name of the macro.
        value is the initial value of the macro.
        N(   t   _namet   set(   R~   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR      s    	c         C   sZ   g  |  _  t | t  r' | j   } n  t |  t k rI |  j |  n |  j |  d S(   s   Explicitly set the value of the macro.

        value is the new value.  It may be a string, a list of strings or a
        _UniqueList instance.
        N(   t   _macrot
   isinstanceR   R   t   typet   listR   R{   (   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    	c         C   s   | r |  j  j |  n  d S(   sL   Append a value to the macro.

        value is the value to append.
        N(   R   R{   (   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR{     s    c         C   s"   x | D] } |  j  |  q Wd S(   sg   Append each element of a value to the macro.

        value is the list of elements to append.
        N(   R{   (   R~   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    c         C   s"   y |  j  j |  Wn n Xd S(   s   Remove a value from the macro.  It doesn't matter if the value 
        wasn't present. 
 
        value is the value to remove. 
        N(   R   t   remove(   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   &  s    c         C   s   |  j  S(   s$   Return the macro as a list.
        (   R   (   R~   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   1  s    (	   R   Ry   R   R   R   R{   R   R   R   (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR      s   						t   Makefilec           B   s  e  Z d  Z d d d d d d d e d e e e e d  Z d   Z e d  Z d   Z d   Z d	   Z	 d
 d  Z
 d   Z d   Z d d  Z d d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d d  Z RS(   s9   The base class for the different types of Makefiles.
    i    i   R   c         C   s&  | rd t  | d  s" t d  n  | j d k rU t |  t k rU d d g } qU n  | j |  _ n	 | |  _ | |  _ | |  _ | |  _	 | |  _
 | |  _ | |  _ | |  _ |
 |  _ | |  _ d |  _ |	 r t j j |	  |  _ n t j   |  _ |  j |  _ | d k r| j |  _ n	 | |  _ | d k r?| j |  _ n	 | |  _ | d k rc| j |  _ n	 | |  _ d |  _ | j   } x t | j     D] } y t! | |  } Wn t" k
 r| | } n X| d k s| d
  d  k r| j#   } n  | d  d k r| j#   } n  t$ | |  |  j% | <qW|  j& d d  |  _' g  |  _( g  |  _) g  |  _* g  |  _+ g  |  _, g  |  _- g  |  _. g  |  _/ t0 j1 d k rd } d } d } d } n d } d } d } d } |  j& d |  |  _2 |  j& d |  |  _3 |  j& d |  |  _4 |  j& d |  |  _5 d S(!   s  Initialise an instance of the target.  All the macros are left
        unchanged allowing scripts to manipulate them at will.

        configuration is the current configuration.
        console is set if the target is a console (rather than windows) target.
        qt is set if the target uses Qt.  For Qt v4 a list of Qt libraries may
        be specified and a simple non-zero value implies QtCore and QtGui.
        opengl is set if the target uses OpenGL.
        python is set if the target #includes Python.h.
        debug is set to generated a debugging version of the target.
        threaded is set if the target requires thread support.  It is
        automatically set if the target uses Qt and Qt has thread support
        enabled.
        warnings is set if compiler warning messages are required.
        debug is set if debugging symbols should be generated.
        dir is the directory for build files and Makefiles.
        makefile is the name of the Makefile.
        installs is a list of extra install targets.  Each element is a two
        part list, the first of which is the source and the second is the
        destination.  If the source is another list then it is a set of source
        files and the destination is a directory.
        universal is the name of the SDK if the target is a MacOS/X universal
        binary.  If it is None then the value is taken from the configuration.
        arch is the space separated MacOS/X architectures to build.  If it is
        None then it is taken from the configuration.
        deployment_target MacOS/X deployment target.  If it is None then it is
        taken from the configuration.
        t
   qt_versions8   The target uses Qt but pyqtconfig has not been imported.i   t   QtCoret   QtGuiR    i    RA   R+   i   RE   RW   i   RZ   Rj   Ri   t   win32t   copyt   delt   mkdirs   if not exists   cp -fs   rm -fs   mkdir -ps   test -dR,   RB   Rk   R*   N(   RA   R+   (   RE   RW   (6   Rz   t   errorR   R   R   t   qt_threadedt	   _threadedt   configt   consolet   _qtt   _openglt   _pythont	   _warningst   _debugt	   _makefilet	   _installst   _infixt   ost   patht   abspatht   dirt   getcwdt   _src_dirRr   R   t
   _universalR   t   _archR   t   _deployment_targett
   _finalisedR   t   keyst   getattrR   t   splitR   t   __dict__t   optional_stringt	   generatort   extra_cflagst   extra_cxxflagst   extra_definest   extra_include_dirst   extra_lflagst   extra_lib_dirst
   extra_libst   extra_source_dirsRw   R   R   t   rmR   t   chkdir(   R~   t   configurationR   t   qtt   openglt   pythont   threadedt   warningst   debugR   t   makefilet   installsR   R   R   R   t   mt   valt   def_copyt   def_rmt	   def_mkdirt   def_chk_dir_exists(    (    s(   lib/python2.7/site-packages/sipconfig.pyR   :  s     																								c   5      C   s  |  j  rZ |  j j j   } d | k } d | k } d | k } d | k } |  j j } n d } d } d } d } d } t   } | j |  j  | j |  j d   t   } | j |  j	  | j |  j d   t   }	 |	 j |  j
  |	 j |  j d	   t d
 g  }
 |
 j |  j  |
 j |  j d   t   } | j |  j  | j |  j d   t   } | j |  j  | j |  j d   t j d k rOg  } g  } x; |  j j   D]* } d | } | j |  | j |  qW|  j r%| j d |  j  | j d |  j  n  | j |  | j |  | j |  n  g  } xI |  j D]> } | j |  j |   |  j  r_| j |  j |   q_q_W| j |  j d   t   } xT |  j D]I } t j j |  } d | k rqn  | d k rqn  | j |  qW|  j r|
 j |  j j  |
 j |  j j  t j d k r| j |  j j  d |  j j d ?|  j j d ?d @f } | j |  j |   qt j d k r| j |  j j  d |  j j d ?|  j j d ?d @f } |  j d k rQ| d } t j j  |  j j |  j |   } t j! | t j"  rQ| } qQn  |  j# r| d } |  j d  k r| j d!  | j d!  qn  | j |  j |   qn  |  j d k r| rd% } d& } n d' } d( } | j |  j |   | j |  j |   | r d) } d* } n d+ } d, } | j |  j |   | j |  j |   | rmd- } d. } n d/ } d0 } | j |  j |   | j |  j |   n  |  j# r| rd1 } d2 } n d3 } d4 } d5 }  d6 }! d7 }" n3 | rd8 } d9 } n d: } d; } d< }  d= }! d> }" |  j d k r|  j$ ra| j |  j |   | j |  j |   n  |  j% r| j |  j d?   | j |  j d@   qn  | j |  j |    | j |  j |!   | j |  j |"   |  j& rdA }# dB }$ n dC }# dD }$ | j |  j |#   | j |  j |$   |  j$ r|| j |  j dE   | j |  j dF   | j |  j dG   n  |  j  ry |  j j' }% Wn t( k
 r|  j j) }% n Xt j j  |% dH  }& |  j dI k r| r|	 j dJ  n  |  j# s|	 j dK  n  | dL k r	x|  j  D]}' |' dM k r@|	 j dN  nl|' dO k r\|	 j dP  nP|' dQ k rx|	 j dR  n4|' dS k r|	 j dT  n|' dU k r|	 j dV  n |' dW k r|	 j dX  n |' dY k r|	 j dZ  n |' d[ k r	|	 j d\  n |' d] k r 	|	 j d^  n |' d_ k r<	|	 j d`  np |' da k rX	|	 j db  nT |' dc k rt	|	 j dd  n8 |' de k r	|	 j df  n |' dg k r	|	 j dh  n  | di k r|' d_ k r	|	 j dR  n  |' d k r	|	 j dj  q	qqWn |  j$ r
|	 j dk  n  |  j dl  }( | j |(  | j |(  | dL k rt j j  |& dm  }) |  j* |) dn  |  _+ i do dM 6dp dQ 6dq dU 6dr dW 6ds da 6}* i d dO 6d dQ 6d dv 6d dS 6d dU 6d dW 6d dY 6d d[ 6d d] 6d dw 6d d_ 6d da 6d dc 6d de 6d dy 6d d{ 6}+ i d d| 6d dO 6d dQ 6d dv 6d dS 6d dU 6d dW 6d dY 6d d[ 6d d] 6d dw 6d d_ 6d da 6d dc 6d de 6d dg 6d dy 6d d{ 6}, | di k r|+ }- n |, }- d] |  j  k rdQ |  j  k r|  j  j dQ  qn  | d} k rFd| |  j  k rFdQ |  j  k r!|  j  j dQ  n  dU |  j  k rF|  j  j dU  qFn  x|  j  D]R}' |  j, |'  }. | j |  j |. |  j- |'    t j d k rt   }/ |' t. |* j/    k r|/ j |  j |* |'   n  |' t. |- j/    k rjx{ |- |' D]l }0 |0 |  j  k r| j |  j |  j, |0    |0 t. |* j/    k rc|/ j |  j |* |0   qcqqWn  | j |/ j0    qP| j |  j |. |  j- |'    qPWn |  j j1 }1 |  j d k r| r|1 t2 |  j3 d
 d  }1 |  j j4 d~ k r|1 d }1 qn  | j |  j |1 |  j j5   | j |  j |  j j1   t j j  |& d  }2 t j! |2 t j"  st j j  |& |  j j  }2 n  |
 j |2  |  j d  }3 |3 r| dL k rx|  j  D]}' |' d{ k r|
 j t j j  |3 d d   q|  j- |'  r|( d }4 |' d| k r2| d k  r2d }' n  |
 j t j j  |4 |' d d   | di k r|' dQ k r|
 j t j j  |4 d d   |
 j t j j  |4 d d   q|' da k r|
 j t j j  |4 d d   qqq|3 d }4 |
 j t j j  |4 |'   | di k r|' dQ k r[|
 j t j j  |4 dt   |
 j t j j  |4 du   q|' da k r|
 j t j j  |4 dx   qqqWn  |
 j |3  qn  |  j6 r|
 j |  j d   | j |  j d   | j |  j d   | j |  j dr   n  |  j  s|  j6 r| dL k  s=|  j6 s=dQ |  j  k r|
 j |  j d   | j |  j d   | j |  j d   qn  |  j$ r| j |  j d   | j |  j d   n | j |  j d   |  j% r| j |  j d   n  | j |  j d   | j |  j7 | j0     |  j8 j9 |  |  j: j9 |  |  j; j9 |	  |  j< j9 |
  |  j= j9 |  |  j> j9 |  |  j? j9 |  d |  _@ d S(   sb   Finalise the macros by doing any consolidation that isn't specific
        to a Makefile.
        t   sharedt
   exceptionst   rttit   stli   i    R   R.   RA   t   .RE   RH   RW   t   darwins   -arch s   -isysroot %ss   -Wl,-syslibroot,%sRZ   s   /qpy/R    s   ..t   cygwins   python%u.%ui   i   i   R   s
   python%u%ut   BMAKEt   _bcppt   _dt   MINGWs   /D_DEBUGt   MSVCs   MSVC.NETt   MSBUILDR   R3   R   R2   R#   R:   R"   R9   R&   R=   R%   R<   R    R7   R   R5   R   R1   RK   R   R6   R   R4   R!   R8   RO   R   R0   R)   R@   R(   R?   R'   R>   RS   t   mkspecsRi   t   QT_DLLt   QT_NO_DEBUGi   R   t   QT_CORE_LIBt   QtDeclarativet   QT_DECLARATIVE_LIBR   t
   QT_GUI_LIBt   QtMultimediat   QT_MULTIMEDIA_LIBt	   QtNetworkt   QT_NETWORK_LIBt   QtOpenGLt   QT_OPENGL_LIBt   QtScriptt   QT_SCRIPT_LIBt   QtScriptToolst   QT_SCRIPTTOOLS_LIBt   QtSqlt
   QT_SQL_LIBt   QtTestt   QT_TEST_LIBt   QtWebKitt   QT_WEBKIT_LIBt   QtXmlt
   QT_XML_LIBt   QtXmlPatternst   QT_XMLPATTERNS_LIBt   phonont   QT_PHONON_LIBi   t   QT_WIDGETS_LIBt   QT_THREAD_SUPPORTt	   LIBDIR_QTs   qconfig.prit   QT_LIBINFIXR\   R]   R^   R_   Rc   t	   QtWidgetst   QtPrintSupportt   QtHelpt   QtSvgt   QtWebKitWidgetst
   QtDesignert	   Qt5AxBaset   QAxContainert   QtAssistanti  s   non-commercialt   nct   defaultt	   INCDIR_QTt   ActiveQti t   QtAssistantClients
   .frameworkt   Headerss   QtWidgets.frameworks   QtPrintSupport.frameworks   QtWebKitWidgets.frameworkRF   RM   RX   RG   RY   Re   Rb   Ra   R`   R[   Rd   N(   R    R   s   ..(   R   s   MSVC.NETR   R   (   R   s   MSVC.NETR   R   (   R   R   (   R   R   R   R   R  R   R   (   R	  R  R   (   R   R   R  R   R   (   R   R   (   R   (   R  R   R   (   R   (   R   R   R   (   R   (   R   R  R   R   (   R   R   (   R   R  R  R   R   (   R   (   R   R   (   R   R   (   R  R  R   R   (   R   R   R   (   R   R   R   (   R   (   R   R   R   (   R   R   (   R   (   R   R   (   R   (   R   R   R   (   R   (   R   R   R   (   R   R   (   R   R   R   (   R   (   R   R   (   R   R   (   R   R   (   R   R   (   R   s   MSVC.NETR   R   (A   R   R   t   qt_winconfigR   R   R   R   R   t   optional_listR   R   R   R   R   Rw   R   R   R{   R   R   R   t   platform_libt   _dependent_libsR   R   t   dirnameR   R   R   R	   R
   R   t   joint   accesst   F_OKR   R   R   R   t   qt_data_dirR   t   qt_dirt   _extract_valueR   t   _qt_module_to_libt   _is_frameworkR   R   R   t   qt_libt   version_to_stringt   replacet
   qt_editionR   R   t   _platform_rpathsR   R   R.   RA   RE   RH   RW   RZ   R   (5   R~   t   wcfgt
   win_sharedt   win_exceptionst   win_rttit   win_stlR   t   cflagst   cxxflagst   definest   incdirt   lflagst   libdirt
   mac_cflagst
   mac_lflagst   at   aflagt   libst   lt   rpathst   l_dirt   py_libt   bpy_libt   bpy_lib_patht   cflags_exceptionst   cxxflags_exceptionst   cflags_rttit   cxxflags_rttit
   cflags_stlt   cxxflags_stlt	   cflags_mtt   cxxflags_mtt   cflags_debugt   cxxflags_debugt   lflags_debugt   cflags_warnt   cxxflags_warnt
   specd_baseR   R   t	   libdir_qtt   qconfigt   wdepmapt
   qt5_depmapt
   qt4_depmapt	   qt_depmapt   libt   depst   qdepR$  t   specdt   qtincdirt   idir(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   finalise  s   
						
				((
$	
															


	"	')#
	

	$		c         C   s=   | d k r d } n  |  j j d  |  j j d |  d S(   s9   Add the link flags for creating a manifest file.
        s	   $(TARGET)s	   /MANIFESTs   /MANIFESTFILE:%s.manifestN(   Rr   RH   R{   (   R~   t   target(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   _add_manifest  s    	c         C   s(   |  j  j o' |  j  j d k p' | d k S(   s;   Return true if the given Qt module is a framework.
        i  R  (   R   R   R   (   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR#    s    c         C   s  |  j  j } | d k rE | d k r< t j d k r< | } qK d } n | } | |  j 7} |  j r t j d k r} | d } q t j d k r |  j |  s | d } q q | d k  r | d } q n  t } t j d k rid	 |  j  j j	   k ri| d% k s| d k r| d k r| d k rD| d k rcd  | d! } qcqf| d k rYt
 } qf| d" } qn' t j j d#  r| d k rt
 } n  | rd  | d$ } n  | S(&   so   Return the name of the Qt library corresponding to a module.

        mname is the name of the module.
        R  i R   R  R   t   dR   i  R   R   R   R  R   R
  R   R   R   R   R   R   R  R   R   R   R   R  R  R	  R  R  i   t   Qt5i   t   4t   linuxi   (   R   R   R  R   R
  R   R   R   R   R   R   R  R   R   R   R   R  R  R	  R  R  (   R   R   Rw   R   R   R   R#  t   FalseR  R   t   Truet
   startswith(   R~   t   mnameR   RS  t
   qt5_rename(    (    s(   lib/python2.7/site-packages/sipconfig.pyR"    sF    			'    			c         C   s   |  j  | j   S(   s]   Return an optional Makefile macro as a list.

        name is the name of the macro.
        (   R   R   (   R~   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    R    c         C   s+   d j  |  j |   } | s' | } n  | S(   s   Return an optional Makefile macro as a string.

        name is the name of the macro.
        default is the default value
        t    (   R  R  (   R~   R   R  t   s(    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    	c         C   s,   |  j  |  } | s( t d |   n  | S(   s^   Return a required Makefile macro as a string.

        name is the name of the macro.
        s    "%s" must have a non-empty value(   R   t
   ValueError(   R~   R   Rf  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   required_string  s    c         C   sn   g  } |  j  d  } | d k r3 |  j  d  } n  | d k rj x( | D] } | j t | |   qF Wn  | S(   sj   Return a list of platform specific rpath flags.

        rpaths is the cannonical list of rpaths.
        Rm   R    RP   (   R   R{   t   _quote(   R~   R:  t   flagst   prefixt   r(    (    s(   lib/python2.7/site-packages/sipconfig.pyR(    s    c         C   sL   |  j  d	 k r | d } n, t j d k r> | r> d | } n
 d | } | S(
   s   Return a library name in platform specific form.

        clib is the library name in cannonical form.
        framework is set of the library is implemented as a MacOS framework.
        R   s   MSVC.NETR   R   s   .libR   s   -framework s   -l(   R   s   MSVC.NETR   R   (   R   Rw   R   (   R~   t   clibt	   frameworkt   plib(    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    
c         C   sG  |  j  d k r1 t j j |  j j | d  } na t j d k ro | ro t j j |  j j | d | d  } n# t j j |  j j d | d  } |  j | d	  j	   } |  j j
 d
 k rCg  } | d k r | j d  | j d  n | d k r| j d  n  x9 | D]. } | j |  j |  j |  |  j	    qWn  | S(   s   Return a list of additional libraries (in platform specific form)
        that must be linked with a library.

        clib is the library name in cannonical form.
        framework is set of the library is implemented as a MacOS framework.
        R   s   MSVC.NETR   R   s   .prlR   s
   .frameworkRS  t   QMAKE_PRL_LIBSi   R   t   Qt5GuiR  R	  R   t	   Qt5WebKitR  (   R   s   MSVC.NETR   R   (   R   Rq  (   R   Rr  (   R   R   R   R  R   t
   qt_lib_dirRw   R   R!  R   R   R{   R   R  R"  (   R~   Rm  Rn  t   prl_nameR8  t	   xtra_libst   xtra(    (    s(   lib/python2.7/site-packages/sipconfig.pyR  ,  s$    ")##c         C   s   d } t  j | t  j  r y t | d  } Wn t k
 rO t d |  n X| j   } x | r | j   } | r | d d k r | j d  } | d k r | |  j   | k r | | d j   } Pq n  | j   } q_ W| j	   n  | S(   s   Return the stripped value from a name=value line in a file.

        fname is the name of the file.
        vname is the name of the value.
        R    Rl  s   Unable to open "%s"i    t   #t   =i   (
   R   R  R  t   opent   IOErrorR   t   readlineRn   t   findt   close(   R~   t   fnamet   vnameR   t   ft   linet   eq(    (    s(   lib/python2.7/site-packages/sipconfig.pyR!  L  s"    	"c         C   s  t  |  t k r! d } | } n;t j j |  rQ t j j |  |  _ | } n t j j |  j |  } i  } y t	 | d  } Wn t
 k
 r t d |  n Xd } | j   } x | rQ| j   } | r8| d d k r8| j d  } | d k rt d | | f  n  | | d j   | | |  j   <n  | d } | j   } q W| j   xB d D]: } y | | Wqct k
 rt d | | f  qcXqcWx8 d D]0 } y | | Wqt k
 rd | | <qXqW|  j d k rd }	 n d }	 g  }
 xA | d
 j   D]/ } t j j |  \ } } |
 j | |	  qWx_ | d j   D]M } |  j sut d |  n  t j j |  \ } } |
 j d | |	  qUWd j |
  | d <| S(   s   
        Parse a build file and return the corresponding dictionary.

        filename is the name of the build file.  If it is a dictionary instead
        then its contents are validated.
        t
   dictionaryRl  s   Unable to open "%s"i   i    Rw  Rx  s?   "%s" line %d: Line must be in the form 'name = value value...'.RZ  t   sourcess   "%s" is missing from "%s".t   headerst   moc_headersR    R   s   MSVC.NETR   R   s   .objs   .os/   "%s" defines "moc_headers" for a non-Qt module.t   moc_Re  t   objects(   RZ  R  (   R  R  (   R   s   MSVC.NETR   R   (   R   t   dictR   R   t   isabsR  R   R  R   Ry  Rz  R   R{  Rn   R|  R}  R   R   R   t   splitextR{   R   (   R~   t   filenamet   bfnamet   bdictR  t   line_nrR  R  t   it   extt   olistt   roott   discard(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   parse_build_filei  s`    			%

		c         C   s   | j  d |  j  x2 | d j   D]  } | j  d |  j | f  q% WxJ | d j   D]8 } t j j |  \ } } | j  d |  j | f  qZ Wd S(   s   Generate the clean target.

        mfile is the file object.
        build is the dictionary created from the build file.
        s   	-%s $(TARGET)
R  s   	-%s %s
R  s   	-%s moc_%s.cpp
N(   t   writeR   R   R   R   R  (   R~   t   mfilet   buildR  R  R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   clean_build_file_objects  s    c         C   s   |  j  s |  j   n  d S(   s.   The Makefile is now ready to be used.
        N(   R   RY  (   R~   (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   ready  s    	c         C   s  |  j    y t j |  j  Wn n Xt j j |  j |  j  } y t | d  } Wn t k
 rw t	 d |  n X|  j
 |  |  j |  |  j |  |  j r t |  j  t k r |  j g |  _ n  x- |  j D] \ } } |  j | | |  q Wn  |  j |  | j   d S(   s   Generate the Makefile.
        t   ws   Unable to create "%s"N(   R  R   t   makedirsR   R   R  R   Ry  Rz  R   t   generate_macros_and_rulest   generate_target_defaultt   generate_target_installR   R   R   t   install_filet   generate_target_cleanR}  (   R~   t   mfnameR  t   srct   dst(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   generate  s(    
	c   	      C   sG  |  j  r  | j d |  j   n  | j d |  j d   | j d |  j d   | j d |  j d   g  } |  j s | j d  n  x( |  j d	  D] } | j d
 |  q Wx. |  j d  D] } | j d t |   q Wg  } |  j d, k rd } n d } xv |  j d  D]e } t j	 d k rk|  j
 j rkd t |  } | j |  | j |  n  | j | t |   qW| j |  j d   | j d d j |   | j d |  j d   | j d |  j d   | j d |  j d   | j d d j |   |  j rJ| j d t |  j d     n  t |  j  } |  j |  j k r~| j |  j  n  | j   r| j d! d j | j     n  |  j d" k r| j d#  n, |  j d$ k r| j d%  n | j d&  |  j d- k r| j d'  n, |  j d( k r6| j d)  n | j d*  d+ S(.   sj   The default implementation of the macros and rules generation.

        mfile is the file object.
        s%   export MACOSX_DEPLOYMENT_TARGET = %s
s	   CC ?= %s
R   s
   CXX ?= %s
R-   s   LINK ?= %s
Rf   s   -DNDEBUGRA   s   -DRE   s   -IR   s   MSVC.NETR   s	   /LIBPATH:s   -LRW   R   s   -FRZ   s   CPPFLAGS = %s
Re  s   CFLAGS = %s
R   s   CXXFLAGS = %s
R.   s   LFLAGS = %s
RH   s
   LIBS = %s
s	   MOC = %s
t   MOCs   VPATH = %s

R   s    .SUFFIXES: .cpp .cxx .cc .C .c

Ri   s#   .SUFFIXES: .c .o .cpp .cc .cxx .C

s    .SUFFIXES: .c .cpp .cc .cxx .C

sG  
{.}.cpp{}.obj::
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -Fo @<<
	$<
<<

{.}.cc{}.obj::
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -Fo @<<
	$<
<<

{.}.cxx{}.obj::
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -Fo @<<
	$<
<<

{.}.C{}.obj::
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -Fo @<<
	$<
<<

{.}.c{}.obj::
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -Fo @<<
	$<
<<
R   s  
.cpp.obj:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<

.cc.obj:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<

.cxx.obj:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<

.C.obj:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o$@ $<

.c.obj:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o$@ $<
s  
.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
N(   R   s   MSVC.NETR   (   R   s   MSVC.NETR   (   R   R  Rh  R   R{   R  Ri  R   Rw   R   R   R   R   R  R   R   R   R   R   R   R   (	   R~   R  t   cppflagsR  R8  t   libdir_prefixt   ldt   fflagt   vpath(    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s`    				##

c         C   s   | j  d  d S(   s]   The default implementation of the default target.

        mfile is the file object.
        s   
all:
N(   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  q  s    c         C   s   | j  d  d S(   s]   The default implementation of the install target.

        mfile is the file object.
        s
   
install:
N(   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  x  s    c         C   s   | j  d  d S(   s[   The default implementation of the clean target.

        mfile is the file object.
        s   
clean:
N(   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    c         C   s?  |  j  d k r d | } n  | j d |  j t |  f  |  j  d k r[ | j d  n  | j d |  j t |  f  t |  t k r | g } n  | r |  j d  } | s d } q n  xx | D]p } t t j	 j
 | t j	 j |    } | j d |  j t |  | f  | r | j d	 | | f  q q Wd
 S(   s@  Install one or more files in a directory.

        mfile is the file object.
        src is the name of a single file to install, or the list of a number of
        files to install.
        dst is the name of the destination directory.
        strip is set if the files should be stripped after been installed.
        Ri   s
   $(DESTDIR)s   	@%s %s s   || s   %s %s
Ro   i    s
   	%s %s %s
s   	%s %s
N(   R   R  R   Ri  R   R   R   R   R   R   R  t   basenameR   (   R~   R  R  R  Rn   t	   strip_cmdt   sfRZ  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s"    
  '#(   R   Ry   R   Rr   R   RY  R[  R#  R"  R  R   Rh  R(  R  R  R!  R  R  R  R  R  R  R  R  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   7  s4   		 			3			 		Q			!				t   ParentMakefilec           B   sP   e  Z d  Z d	 d d	 d  Z d   Z d   Z d   Z d   Z d d  Z	 RS(
   s1   The class that represents a parent Makefile.
    R   c      	   C   s/   t  j |  | d | d | d | | |  _ d S(   si   Initialise an instance of a parent Makefile.

        subdirs is the sequence of subdirectories.
        R   R   R   N(   R   R   t   _subdirs(   R~   R   t   subdirsR   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    "c         C   s   d S(   sJ   Generate the macros and rules.

        mfile is the file object.
        N(    (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    c         C   s   |  j  |  d S(   sH   Generate the default target.

        mfile is the file object.
        N(   t   _subdir_target(   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    c         C   s   |  j  | d  d S(   sH   Generate the install target.

        mfile is the file object.
        t   installN(   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    c         C   s   |  j  | d  d S(   sF   Generate the clean target.

        mfile is the file object.
        t   cleanN(   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    t   allc         C   s   | d k r d } n
 d | } | j  d | d  x |  j D] } |  j d k rm | j  d | | f  q> |  j d k r | j  d	 | | f  q> | j  d
 |  | j  d |  | j  d  q> Wd S(   s   Create a target for a list of sub-directories.

        mfile is the file object.
        target is the name of the target.
        R  R    Re  s   
s   :
R   s   	@$(MAKE) -C %s%s
Ri   s   	@(cd %s; $(MAKE)%s)
s   	cd %s
s   	$(MAKE)%s
s   	@cd ..
N(   R  R  R   (   R~   R  RZ  t   tnameR\  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    	
N(
   R   Ry   R   Rr   R   R  R  R  R  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s   					t   PythonModuleMakefilec           B   s5   e  Z d  Z d d d d d  Z d   Z d   Z RS(   s8   The class that represents a Python module Makefile.
    R   c      	   C   sq   t  j |  | d | d | d | | s1 d } n  | rR t j j | |  |  _ n	 | |  _ | |  _ | |  _ d S(   sc  Initialise an instance of a parent Makefile.

        dstdir is the name of the directory where the module's Python code will
        be installed.
        srcdir is the name of the directory (relative to the directory in which
        the Makefile will be created) containing the module's Python code.  It
        defaults to the same directory.
        R   R   R   R   N(   R   R   R   R   R  t   _moddirt   _srcdirt   _dstdir(   R~   R   t   dstdirt   srcdirR   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    
"			c         C   s   d S(   sJ   Generate the macros and rules.

        mfile is the file object.
        N(    (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  	  s    c   	      C   s  t  j |  |  x t j |  j  D] \ } } } x* d D]" } | | k r9 | j |  q9 q9 W| t |  j  } g  } xg | D]_ } | d k r q n  t j j t j j	 | |   r | j
 t j j	 |  j | |   q q W|  j | | |  j |  q# Wd S(   sH   Generate the install target.

        mfile is the file object.
        s   .svnt   CVSR   N(   s   .svnR  (   R   R  R   t   walkR  R   t   lenR   t   isfileR  R{   R  R  R  (	   R~   R  R  t   dirst   filest   skipt   tailt   flistR  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s    "!*N(   R   Ry   R   Rr   R   R  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s
   	t   ModuleMakefilec           B   s}   e  Z d  Z d d d d d d d d d d d d d d d d d  Z d   Z d   Z d   Z d   Z d	   Z	 d
   Z
 RS(   sA   The class that represents a Python extension module Makefile
    i    i   R   c         C   s@  t  j |  | | | | d | |	 |
 | | | | | |  |  j |  |  _ | |  _ | |  _ d |  j d  k |  _ |
 s | r d |  _ d |  _	 n | |  _ | |  _	 |  j d |  _
 |  j j d k r d |  j
 |  _ n d |  j
 |  _ t j d	 k r| rd
 |  j
 |  _
 n  t j d	 k r<|
 r<|  j
 d |  _
 n  d S(   s
  Initialise an instance of a module Makefile.

        build_file is the file containing the target specific information.  If
        it is a dictionary instead then its contents are validated.
        install_dir is the directory the target will be installed in.
        static is set if the module should be built as a static library.
        strip is set if the module should be stripped of unneeded symbols when
        installed.  The default is 1.
        export_all is set if all the module's symbols should be exported rather
        than just the module's initialisation function.  Exporting all symbols
        increases the size of the module and slows down module load times but
        may avoid problems with modules that use exceptions.  The default is 0.
        i   t   embed_manifest_dllR+   i    RZ  i   s	   PyInit_%ss   init%sR   RS  R   N(   R   R   R  t   _buildt   _install_dirt   staticR  t	   _manifestt   _stript   _limit_exportst   _targetR   R
   t   _entry_pointRw   R   (   R~   R   t
   build_filet   install_dirR  R   R   R   R   R   R   R   R   R   Rn   t
   export_allR   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   .  s$    7				
c         C   s  |  j  r d } n d } |  j r4 |  j j d  n |  j j |  j d   |  j j |  j d   |  j d  } | r |  j j |  n |  j  r d } n d } |  j	 r |  j
   n  t j d	 k r d
 g } n |  j d  } | s |  j d  } n  |  j j |  |  j j |  j |   t j d	 k rI|  j j d  n  t j |   |  j s}|  j d  r6|  j d  d k rd |  j j g } |  j r#| j d  | j d  | j d |  j  q#nP d d |  j j g } |  j r#| j d  | j d  | j d |  j  n  |  j j |  q}|  j rRt j d  d k ro|  j j d |  j g  qRt j d  d k r|  j d  d k r|  j j d d |  j g  qO|  j j d  d! d" |  j g  qRt j d  d# k r
|  j j d$ |  j g  qRt j d  d% k rR|  j d  d k rR|  j j d& |  j g  qRn  |  j d'  } | r}|  j j |  q}n  |  j j d(  d) S(*   s<   Finalise the macros common to all module Makefiles.
        RI   RT   t   SIP_STATIC_MODULER$   R;   RL   RJ   RU   R   s   -bundleRN   RQ   s   -undefined dynamic_lookupR   Rf   s   g++s   -Wl,-bI:%s/python.exps   -Wl,-bnoexpalls   -Wl,-bnoentrys   -Wl,-bE:%s.exps
   -qmkshrobjs   -bI:%s/python.exps
   -bnoexpalls	   -bnoentrys
   -bE:%s.expi   R_  s   -Wl,--version-script=%s.expt   sunoss   -Wl,-z,noversions   -Wl,-M,%s.exps   -znoversions   -Ms   %s.exps   hp-uxs	   -Wl,+e,%st   irixs   -Wl,-exported_symbol,%sRg   s   -Wl,--no-undefinedN(   R   R  RA   R{   R   R   R  R.   RH   R  R[  Rw   R   R   RY  R   Rh  R   R	   R  R  R  Rf   R   R   (   R~   t   lflags_consolet
   lflags_dllt   lflags_plugint
   aix_lflagst
   link_shlib(    (    s(   lib/python2.7/site-packages/sipconfig.pyRY  `  sn    										 #( c         C   s   t  d   d S(   s   Return the name of a SIP v3.x module when it is used as a library.
        This will raise an exception when used with SIP v4.x modules.

        mname is the name of the module.
        s.   module_as_lib() can only be used with SIP v3.xN(   Rg  (   R~   Rc  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   module_as_lib  s    c         C   s  |  j  r* t j d k r! d } q d } nr t j d k rB d } nZ t j d k rZ d } nB t j d k rr d } n* |  j d	  } | s |  j d
 d  } n  | j d |  j d |  | j d |  j d  | j d |  j d |  j d f  | j d  |  j  r|  j d k r7| j d |  j d   q|  j d k rl| j d |  j d   d |  _
 q| j d |  j d   |  j d  |  _
 |  j
 r| j d |  j
  qn  t j |  |  d S(    sU   Generate the macros and rules generation.

        mfile is the file object.
        R   RS  R6  t   pydR   t   soR   t   dllRC   RD   s   TARGET = %s
R   s   OFILES = %s
R  s   HFILES = %s %s
R  R  s   
R   s   MSVC.NETR   R   s	   LIB = %s
RV   R   s   AR = %s
R   Rl   s   RANLIB = %s
N(   R   s   MSVC.NETR   R   (   R  Rw   R   R   R  R  R  R   Rh  Rr   t   _ranlibR   R  (   R~   R  R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s8    						%		c   	      C   sY  | j  d  | j  d  xi |  j d j   D]T } t j j |  \ } } d | d } | j  d | | f  | j  d |  q. W| j  d  |  j d+ k r|  j r | j  d  | j  d  | j  d  qU| j  d  | j  d  | j  d  |  j rU| j  d  qUn=|  j d k rI|  j r| j  d |  j	  | j  d  x, |  j d j   D] } | j  d |  qeW| j  d  qU| j  d  | j  d |  j
  | j  d  t j j |  j |  j
 d  } y t | d  } Wn t k
 rt d |  n X| j  d  | j  d |  j |  j f  | j   n|  j r| j  d |  j	  | j  d  |  j rU| j  d   qUn |  j rHt j d!  d" k r| j  d# |  j |  j
 f  qHt j d!  d$ k r| j  d# |  j |  j
 f  qHt j d%  d& k rH| j  d' |  j
  | j  d( |  j |  j
 f  qHn  | j  d)  d* S(,   sH   Generate the default target.

        mfile is the file object.
        s   
all: $(TARGET)
s   
$(OFILES): $(HFILES)
R  R  s   .cpps   
%s: %s
s   	$(MOC) -o %s $<
s   
$(TARGET): $(OFILES)
R   s   MSVC.NETR   s   	$(LIB) /OUT:$(TARGET) @<<
s   	  $(OFILES)
s   <<
s&   	$(LINK) $(LFLAGS) /OUT:$(TARGET) @<<
s   	  $(OFILES) $(LIBS)
sE   	mt -nologo -manifest $(TARGET).manifest -outputresource:$(TARGET);2
R   s   	-%s $(TARGET)
s   	$(LIB) $(TARGET) @&&|
R  s   +%s \
s   |
s   	$(LINK) @&&|
s,   	$(LFLAGS) $(OFILES) ,$(TARGET),,$(LIBS),%s
s   .defR  s   Unable to create "%s"s   EXPORTS
s   %s=_%s
s   	$(AR) $(TARGET) $(OFILES)
s   	$(RANLIB) $(TARGET)
i   R_  s-   	@echo '{ global: %s; local: *; };' > %s.exp
R  i   t   aixs   	@echo '#!' >%s.exps   ; \
	 echo '%s' >>%s.exp
s2   	$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
N(   R   s   MSVC.NETR   (   R  R  R   R   R   R  R   R  R  R   R  R  R   Ry  Rz  R   R  R}  R  R  Rw   R   (	   R~   R  t   mfR  R  t   cppt   oft   defnamet   dfile(    (    s(   lib/python2.7/site-packages/sipconfig.pyR    sd    						  #c         C   sN   |  j  d k r! |  j j |  _  n  | j d  |  j | d |  j  |  j  d S(   sH   Generate the install target.

        mfile is the file object.
        s   
install: $(TARGET)
s	   $(TARGET)N(   R  Rr   R   R   R  R  R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  E  s    c         C   s   | j  d  |  j | |  j  |  j rJ |  j rJ | j  d |  j  n  |  j r t j d  d k s t j d  d k s t j d  d k r | j  d |  j |  j	 f  n  d	 S(
   sF   Generate the clean target.

        mfile is the file object.
        s   
clean:
s   	-%s $(TARGET).manifest
i   R_  R  i   R  s   	-%s %s.exp
N(
   R  R  R  R  R  R   R  Rw   R   R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  P  s    N(   R   Ry   R   Rr   R   RY  R  R  R  R  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  +  s   	.	d		+	N	t   SIPModuleMakefilec           B   sS   e  Z d  Z d d d d d d d d d d d d d d d d d d  Z d   Z RS(   s?   The class that represents a SIP generated module Makefile.
    i    i   R   c         C   sP   t  j |  | | | | | | | | |	 |
 | | | | | | | |  | |  _ d S(   s8  Initialise an instance of a SIP generated module Makefile.

        prot_is_public is set if "protected" is to be redefined as "public".
        If the platform's C++ ABI allows it this can significantly reduce the
        size of the generated code.

        For all other arguments see ModuleMakefile.
        N(   R  R   t   _prot_is_public(   R~   R   R  R  R  R   R   R   R   R   R   R   R   R   Rn   R  R   R   t   prot_is_publicR   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   e  s
    c         C   sS   |  j  r, |  j j d  |  j j d  n  |  j j |  j j  t j |   d S(   sA   Finalise the macros for a SIP generated module Makefile.
        t   SIP_PROTECTED_IS_PUBLICs   protected=publicN(   R  RA   R{   RE   R   R   R  RY  (   R~   (    (    s(   lib/python2.7/site-packages/sipconfig.pyRY  y  s
    	N(   R   Ry   R   Rr   R   RY  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  b  s   t   ProgramMakefilec           B   sz   e  Z d  Z d d d d d d d d d d d d d d d d  Z d   Z d   Z d   Z d   Z d	   Z	 d
   Z
 RS(   s2   The class that represents a program Makefile.
    i    i   R   c         C   s   t  j |  | | | | | | |	 |
 | | | | | |  | |  _ d |  j d  k |  _ d |  _ | r| |  j |  |  _ n	 d |  _ d S(   s  Initialise an instance of a program Makefile.

        build_file is the file containing the target specific information.  If
        it is a dictionary instead then its contents are validated.
        install_dir is the directory the target will be installed in.
        t   embed_manifest_exeR+   N(	   R   R   R  R  R  Rr   R  R  R  (   R~   R   R  R  R   R   R   R   R   R   R   R   R   R   R   R   R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyR     s    
7		c         C   s1  t  j j |  \ |  _ } t j d$ k r: |  j d } n	 |  j } |  j   g  } | j |  j d   x( |  j	 j
   D] } | j d |  qy Wx( |  j d  D] } | j d |  q Wx. |  j d  D] } | j d	 t |   q W| j |  j d
   | j |  j d   |  j d k r;| j |  n  |  j d% k rm| j d  | j d  d } nI |  j d k r| j d |  d } n  | j d  | j |  d } xc |  j d  D]R } t j d k r|  j j r| j d t |   n  | j | t |   qW|  j d  }	 |  j d k rg  }
 x |	 D] } x | j
   D]q } | d d k rd | d d !} n! | d d k rd | d } n  | d  j   d! k rZ|
 j |  qZqZWqGW|
 }	 n  | j |	  | j |  j d"   |  j d k r| j |  n  | d# j |  f S(&   s   Create a command line that will build an executable.  Returns a
        tuple of the name of the executable and the command line.

        source is the name of the source file.
        R   R   s   .exeR-   s   -arch RA   s   -DRE   s   -IR.   R/   R   R   s   MSVC.NETR   s   -Fes   /links	   /LIBPATH:s   -es   -Ls   -oRW   R   s   -FRH   it   -s   -l-i   i    s   -lis   .objRZ   Re  (   R   R   (   R   s   MSVC.NETR   (   R   R   R  R  Rw   R   R  R{   Rh  R   R   R  Ri  R   R   R   R   t   lowerR  (   R~   t   sourcet   _t   exeR  R6  R  R  R  R2  t   blflagst   lf(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   build_command  s`    	
			c         C   s   |  j  d k r" |  j j d  n  |  j r> |  j |  j  n  |  j rP d } n d } |  j j |  j |   t	 j
 |   d S(	   s4   Finalise the macros for a program Makefile.
        R   s   MSVC.NETR   s   /INCREMENTAL:NORI   RT   N(   R   s   MSVC.NETR   (   R   RH   R{   R  R[  R  R   R   R  R   RY  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyRY    s    			c         C   s   |  j  s t d   n  |  j  d } t j d k rA | d } n  | j d |  | j d |  j  d  | j d	 |  j  d
  | j d  t j |  |  d S(   sU   Generate the macros and rules generation.

        mfile is the file object.
        s8   pass a filename as build_file when generating a MakefileRZ  R   R   s   .exes   TARGET = %s
s   OFILES = %s
R  s   HFILES = %s
R  s   
N(   R   R   (   R  Rg  Rw   R   R  R   R  (   R~   R  RZ  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  	  s    	c         C   s\  | j  d  | j  d  x |  j d j   D] } t j j |  \ } } d | d } |  j |  j k r t j j |  j |  } n  | j  d | | f  | j  d |  q. W| j  d  |  j	 d k r | j  d  | j  d  | j  d  nF |  j	 d k r2| j  d  | j  d  | j  d  n | j  d  |  j
 rX| j  d  n  d S(   sH   Generate the default target.

        mfile is the file object.
        s   
all: $(TARGET)
s   
$(OFILES): $(HFILES)
R  R  s   .cpps   
%s: %s
s   	$(MOC) -o %s $<
s   
$(TARGET): $(OFILES)
R   s   MSVC.NETR   s&   	$(LINK) $(LFLAGS) /OUT:$(TARGET) @<<
s   	  $(OFILES) $(LIBS)
s   <<
R   s   	$(LINK) @&&|
s+   	$(LFLAGS) $(OFILES) ,$(TARGET),,$(LIBS),,
s   |
s2   	$(LINK) $(LFLAGS) -o $(TARGET) $(OFILES) $(LIBS)
sE   	mt -nologo -manifest $(TARGET).manifest -outputresource:$(TARGET);1
N(   R   s   MSVC.NETR   (   R  R  R   R   R   R  R   R   R  R   R  (   R~   R  R  R  R  R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s*    	c         C   sH   |  j  d k r! |  j j |  _  n  | j d  |  j | d |  j   d S(   sH   Generate the install target.

        mfile is the file object.
        s   
install: $(TARGET)
s	   $(TARGET)N(   R  Rr   R   R   R  R  (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  A  s    c         C   sD   | j  d  |  j | |  j  |  j r@ | j  d |  j  n  d S(   sF   Generate the clean target.

        mfile is the file object.
        s   
clean:
s   	-%s $(TARGET).manifest
N(   R  R  R  R  R   (   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR  L  s    	N(   R   Ry   R   Rr   R   R  RY  R  R  R  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR    s   	Y			$	c         C   sN   t  j d k r$ |  j d d  }  n  |  j d  d k rJ d |  d }  n  |  S(   s^   Return a string surrounded by double quotes it if contains a space.

    s is the string.
    R   t   /s   \Re  i    t   "(   Rw   R   R&  R|  (   Rf  (    (    s(   lib/python2.7/site-packages/sipconfig.pyRi  X  s
    i   c         C   st   t  |  d ?d @ g } | d k rg | j t  |  d ?d @  | d k rg | j t  |  d @  qg n  d j |  S(   s    Convert an n-part version number encoded as a hexadecimal value to a
    string.  version is the version number.  Returns the string.
    i   i   i   i   i   R   (   t   strR{   R  (   t   versiont   partst	   part_list(    (    s(   lib/python2.7/site-packages/sipconfig.pyR%  g  s    c         C   s   |  j  d  } t | t  s" d St |  d k rD | j d  n  t |  d k rZ d Sd } xA | D]9 } y t |  } Wn t k
 r d SX| d >| } qg W| S(   s    Convert a version string of the form m.n or m.n.o to an encoded version
    number (or None if it was an invalid format).  version_str is the version
    string.
    R   i   t   0i   i    i   N(   R   R   R   Rr   R  R{   t   intRg  (   t   version_strR  R  t   partt   v(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   version_from_stringw  s    c         C   s  | d k	 } | d k	 } d } d } t |   } | j   }	 x|	 r\| sQ | r\|	 j   }
 t |
  d k rM|
 d d k rM| r|
 d | k r|
 d } | d d !d k r t | d  } nD t |  } | d } | d d	 } | d	 } | d >| d
 >| } d } n  | rM|
 d | k rMd j |
 d  d d !} d } qMn  | j   }	 q? W| j   | ss| rt d | |  f  n  | | f S(   s  Read the version information for a package from a file.  The information
    is specified as #defines of a numeric (hexadecimal or decimal) value and/or
    a string value.

    filename is the name of the file.
    description is the descriptive name of the package.
    numdefine is the name of the #define of the numeric version.  It is ignored
    if it is None.
    strdefine is the name of the #define of the string version.  It is ignored
    if it is None.

    Returns a tuple of the version as a number and as a string.
    i   i    s   #definei   i   t   0xi   id   i
   i   Re  is<   The %s version number could not be determined by parsing %s.N(	   Rr   Ry  R{  R   R  R  R  R}  R   (   R  t   descriptiont	   numdefinet	   strdefinet   need_numt   need_strt   verst   versstrR  R9  t   wlR  t   dect   majt   mint   bug(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   read_version  s6    "


	
c      	   C   s  d } t  |  j    } | j   d } x/ | D]' } t |  } | | k  r/ | } q/ q/ Wx=| D]5} |  | } t |  } d }	 | d k r d } ns | t  k r d j |  } d }	 nO | t k r | j d  d k r d | } qt	 |  } n t	 |  } d }	 |	 r7d | k r&d }	 n  |	 | |	 } n  | d	 | d
 d | t |  d | j
 d d  } | | d k r| d } n  | d } qa W| d } | d } | r| d } t  | j    }
 |
 j   d } x/ |
 D]' } t |  } | | k  r| } qqWx |
 D] } | |
 d k r8d } n d } | | } d | k r]d }	 n d }	 d | d
 } | d d | d | |	 | j
 d d  |	 | f } qW| d } n
 | d } | S(   sM  Convert a dictionary to a string (typically to use as the content to a
    call to create_config_module()).  Dictionary values that are strings are
    quoted.  Dictionary values that are lists are converted to quoted strings.

    dict is the dictionary.
    macros is the optional dictionary of platform specific build macros.
    s   _pkg_config = {
i    Rr   Re  t   'R  s   0x%06xs   '''s       's   ':i   s   \s   \\it   ,s   
s   }

s   _default_macros = s   {
R    s       %-*s  %s%s%s%s
i   s   }
s   None
N(   R   R   t   sortR  R   Rr   R  R  R|  R  R&  (   t   cdictR   t   contentR   t   widtht   kt   klenR   t   vtypet   delimt   namest   ct   clent   sep(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   create_content  sn    

			8



	
	8
c         C   s   t  |  t k r$ t | |  } n  d } t |  d  } t | d  } | j   } xA | r | j |  d k r{ | } n  | j |  | j   } qW W| j   | j   d S(	   s  Create a configuration module by replacing "@" followed by
    "SIP_CONFIGURATION" followed by "@" in a template file with a content
    string.

    module is the name of the module file.
    template is the name of the template file.
    content is the content string.  If it is a dictionary it is first converted
    to a string using create_content().
    macros is an optional dictionary of platform specific build macros.  It is
    only used if create_content() is called to convert the content to a string.
    t   @t   SIP_CONFIGURATIONR  Rl  i    Ns   @SIP_CONFIGURATIONs   @SIP_CONFIGURATION@(   R   R  R  Ry  R{  R|  R  R}  (   t   modulet   templateR  R   t   keyt   dfR  R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   create_config_module*	  s    		
c         C   s|   t  | j    } | j   |  d k  r9 | | d } n? x< | D]  } |  | k  r@ | | } Pq@ q@ Wt d | |  f  | S(   s  Convert a version number to a SIP tag.

    version is the version number.  If it is negative then the latest version
    is assumed.  (This is typically useful if a development preview  is
    indicated by a negative version number.)
    tags is the dictionary of tags keyed by version number.  The tag used is
    the one with the smallest key (ie. earliest version) that is greater than
    the given version number.
    description is the descriptive name of the package used for error messages.

    Returns the corresponding tag.
    i    is   Unsupported %s version: 0x%06x.(   R   R   R  R   (   R  t   tagsR  t   vlt   tagR  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   version_to_sip_tagL	  s    

c         C   s/   t  j j t d |   d  t  j d  d S(   sW   Display an error message and terminate.

    msg is the text of the error message.
    s   Error: s   
i   N(   Rw   t   stderrR  t   formatt   exit(   t   msg(    (    s(   lib/python2.7/site-packages/sipconfig.pyR   j	  s    c         C   s   t  j j t |   d  d S(   sO   Display an information message.

    msg is the text of the error message.
    s   
N(   Rw   t   stdoutR  R)  (   R+  (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   informs	  s    iN   c         C   s   | } d | } x |  j    D] } t |  } | | k rf | | | k rf | d d | } | } n  | | k r | d } | d } n  | | } | | } q W| S(   s   Format a message by inserting line breaks at appropriate places.

    msg is the text of the message.
    leftmargin is the position of the left margin.
    rightmargin is the position of the right margin.

    Return the formatted message.
    Re  s   
i   (   R   R  (   R+  t
   leftmargint   rightmargint   curst   fmsgR  R9  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR)  {	  s    	
	

c         C   s  i  } | d k	 r x | D] } d } | j d  } | d k rS d } | d } n, | j d  } | d k r{ | d } n d S| |  }	 |	 | k r d S| | | | |	 <q Wn  d d d	     Y}
 |
 |   } i t j d
 6d d 6d d 6d d 6} | j   } x| rxP t |  d k r]| d d k r]| d  } | j   } | rY| | } qPqW| j d d  d j   } | r| j d  } | d k r| | d d k rt } | d } n t	 } | j d  } | } | d k r| |  j   } | | d j   } | j
 d d  j
 d d  } | rl| d k rl| j |  } | d k	 rl| d | } qln  t | | |  | | <qn  | j   } qWi  } x | D] } d | | <qWd } xNt | j    D]:} | j |  r| t |  } n | } | | k rqn  | | } d d g } xC | D]5 } | j |  } | d k r/| t |  } Pq/q/Wd } x | d k rE| | j d  } | d k  rPn  | | } | | | !}	 y t j |	 } Wn t k
 rd } n X| |  | | | d } xC | D]5 } | j |  } | d k r| t |  } PqqWd } qqW| j d  } x | d k r| | d j d  } | d k  rPn  | d | } | | d | !}	 y t j |	 } Wn t k
 rd } n X| |  | | | d } | j d  } qXW| | | <qWx{ t | j    D]g } | | } | | } | j d  d k rz| rm| d | d } q| d } n | } | | | <q#W| S(   s  Parse a qmake compatible file of build system macros and convert it to a
    dictionary.  A macro is a name/value pair.  The dictionary is returned or
    None if any of the overrides was invalid.

    filename is the name of the file to parse.
    names is a list of the macro names to extract from the file.
    overrides is an optional list of macro names and values that modify those
    found in the file.  They are of the form "name=value" (in which case the
    value replaces the value found in the file) or "name+=value" (in which case
    the value is appended to the value found in the file).
    properties is an optional dictionary of property name and values that are
    used to resolve any expressions of the form "$[name]" in the file.
    R    s   +=i    t   +i   Rx  i   t   qmake_build_file_readerc           B   s5   e  Z d    Z d   Z d   Z d   Z d   Z RS(   c         S   s>   | |  _  d  |  _ g  |  _ g  |  _ d  |  _ |  j |  d  S(   N(   R  Rr   t   currentfilet	   filestackt	   pathstackt
   cond_fnamet	   _openfile(   R~   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR   	  s    					c         S   s   y t  | d  } Wn2 t k
 rG |  j | k r6 d  St d |  n X|  j rz |  j j |  j  |  j j |  j  n  | |  _ t	 j j
 |  |  _ d  S(   NRl  s   Unable to open %s(   Ry  Rz  R7  R   R4  R5  R{   R6  R   R   R  (   R~   R  R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR8  	  s    		c         S   s7  |  j  j   } | j   } |  j rK | d k rK d  |  _ |  j  j   } n | j d  r | j d  r |  j | d  j   d d !j    |  _ |  j  j   } nB | j d  r |  j | d d !j    } |  j |  |  j   S| s3|  j  j	   |  j
 r3|  j
 j   |  _  |  j j   |  _ |  j   Sn  | S(   Nt   }s   exists(t   {ii   s   include(i   (   R4  R{  Rn   R7  Rr   Rb  t   endswitht
   _normaliseR8  R}  R5  t   popR6  R   (   R~   R  t   slinet   nextfile(    (    s(   lib/python2.7/site-packages/sipconfig.pyR{  	  s&    	)
	c         S   s[   d | k r* t  j j |  j |   } n  t  j j |  sW t  j j |  j |  } n  | S(   Ns   $((   R   R   t   normpatht   _expandvarsR  R  (   R~   R~  (    (    s(   lib/python2.7/site-packages/sipconfig.pyR<  	  s
    c         S   s   d } x t  r t j d | |  } | s/ Pn  | j d  \ } } | j d  } | t j k r | | } | |  t j | } t |  } | | 7} q	 | } q	 W| S(   Ni    s   \$\((\w+)\)i   (   Ra  t   ret   searcht   spant   groupR   t   environR  (   R~   R~  R  R   t   jR   R  (    (    s(   lib/python2.7/site-packages/sipconfig.pyRA  
  s    	

(   R   Ry   R   R8  R{  R<  RA  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyR3  	  s
   				
t   DIR_SEPARATORRe  t   LITERAL_WHITESPACEt   $t   LITERAL_DOLLARRw  t   LITERAL_HASHis   \s   \"R  s   \'R  t   QMAKE_s   $$(s   $(it   )t   %N(    (   Rr   R|  R   R  R{  R  R   Rn   Ra  R`  R&  t   gett   _expand_macro_valueR   R   Rb  RF  R   (   R  R  t	   overridest
   propertiest   oridest   orideRk  t   name_endt	   val_startR   R3  R  t   rawR  t   nextt   assstartt   addingt   assendt   lhst   rhst   orig_rhst   refinedR   t   macro_prefixt   reflhst   pleadint   plt   estartt   nstartt   eendt   env(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   parse_build_macros	  s    
T

	%
 






c   
      C   s  | j  d  } | j  d  } xt| d k r| | k r| d } | t |  k  rx | | d k rx | d } d } n> | t |  k  r | | d k r | d } d	 } n	 t j } | } x0 | t |  k  r | | | k r | d } q W| | | !} | d
 k r| d } n  | d	 k rK| d k r6d }	 q]| j | d  }	 n |  j | d  }	 | |  |	 | | } | j  d  } | j  d  } q! W| S(   s6   Expand the value of a macro based on ones seen so far.s   $$(s   $$i    i   R:  i   R9  t   [t   ]s   }]R    N(   R|  R  t   stringt
   whitespaceRr   RP  (
   R   R^  RS  Re  t   mstartt   rstartt   termt   mendR]  R   (    (    s(   lib/python2.7/site-packages/sipconfig.pyRQ  
  s4    
"
	"
		%	c         C   s  t  j d k r | d } n  t | d  } t  j d k rt t  j } | rZ | d  d } n  | j d | |  f  nt  j d k rat  j } | d } | d	 } | r | d
 k r | d k s | d k r d } q d } n d } d | | | f } | r:d j g  | j   D] }	 d |	 ^ q }
 d |
 | f } n  | j d  | j d | |  f  n' | j d  | j d t  j |  f  | j   t  j d k rt	 j
 |  } | j } | t
 j t
 j Bt
 j BO} t	 j | |  n  | S(   s  Create a platform dependent executable wrapper around a Python script.

    script is the full pathname of the script.
    wrapper is the name of the wrapper file to create.
    gui is non-zero if a GUI enabled version of the interpreter should be used.
    use_arch is the MacOS/X architectures to invoke python with.  Several space
    separated architectures may be specified.

    Returns the platform specific name of the wrapper.
    R   s   .batR  is   w.exes/   @"%s" "%s" %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
R   i    i   i   i   R   t   pythonws   %s%d.%dRe  s   -%ss
   arch %s %ss
   #!/bin/sh
s   exec %s %s ${1+"$@"}
(   Rw   R   Ry  t
   executableR  t   version_infoR  R   R}  R   t   statt   st_modet   S_IXUSRt   S_IXGRPt   S_IXOTHt   chmod(   t   scriptt   wrappert   guit   use_archt   wfR  R  t   py_majort   py_minorR6  t
   arch_flagst   sbuft   mode(    (    s(   lib/python2.7/site-packages/sipconfig.pyt   create_wrapper
  s@    		

$		,
	(    Rw   R   Ru  Rl  RB  R|   Rq   R}   Rv   Rp   R   R   R   R  R  R  R  R  Ri  R%  R  Rr   R  R  R#  R'  R   R-  R)  Ri  RQ  R  (    (    (    s(   lib/python2.7/site-packages/sipconfig.pyt   <module>   s  

=+=    zB< 8#		7_"				 	,