
    擖g^                         S r SSKrSSKrSSKrSSKrSSKrS r " S S5      r\S:X  a&  \R                  " \" \R                  SS 5      5        gg)zThese functions are executed via gyp-flock-tool when using the Makefile
generator.  Used on systems that don't have a built-in flock.    Nc                 :    [        5       nUR                  U 5        g )N)	FlockToolDispatch)argsexecutors     0/usr/lib/python3/dist-packages/gyp/flock_tool.pymainr	      s    {Hd    c                   *    \ rS rSrSrS rS rS rSrg)r      z(This class emulates the 'flock' command.c                     [        U5      S:  a  [        S5      eSU R                  US   5      -  n[        X5      " USS 6   g)z(Dispatches a string command to a method.   zNot enough argumentszExec%sr   N)len	Exception_CommandifyNamegetattr)selfr   methods      r   r   FlockTool.Dispatch   sE    t9q=233D00a99tABx(r
   c                 B    UR                  5       R                  SS5      $ )z<Transforms a tool name like copy-info-plist to CopyInfoPlist- )titlereplace)r   name_strings     r   r   FlockTool._CommandifyName    s      "**333r
   c           
      (   [         R                  " U[         R                  [         R                  -  [         R                  -  S5      n[
        R                  R                  S5      (       d  [
        R                  S:X  a,  [        R                  " S[        R                  SSSSSS5      nO+[        R                  " S[        R                  SSSSSS5      n[        R                  " U[        R                  U5        [        R                  " U5      $ )z5Emulates the most basic behavior of Linux's flock(1).i  aixos400hhIllqqr   hhllhhl)osopenO_WRONLYO_NOCTTYO_CREATsysplatform
startswithstructpackfcntlF_WRLCKF_SETLK
subprocesscall)r   lockfilecmd_listfdops        r   	ExecFlockFlockTool.ExecFlock$   s     WWXr{{R[[82::EuM<<""5))S\\W-D Yq!Q1aHBYq!Q1aHBBr*x((r
    N)	__name__
__module____qualname____firstlineno____doc__r   r   r5   __static_attributes__r7   r
   r   r   r      s    2)4)r
   r   __main__r   )r<   r,   r"   r*   r/   r'   r	   r   r8   exitargvr7   r
   r   <module>rA      sV   A  	   

) )B zHHT#((12,  r
   