Ë
    Ï"KbÕ  ã                   ó¢   — d Z ddlZddlZddlZddlZddlZd„ Z G d„ de«      Ze	dk(  r& ej                   eej                  dd «      «       yy)z…These functions are executed via gyp-flock-tool when using the Makefile
generator.  Used on systems that don't have a built-in flock.é    Nc                 ó:   — t        «       }|j                  | «       y )N)Ú	FlockToolÚDispatch)ÚargsÚexecutors     ú0/usr/lib/python3/dist-packages/gyp/flock_tool.pyÚmainr	      s   € Ü‹[€(Ø
×Ñ�DÕó    c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)r   z(This class emulates the 'flock' command.c                 óˆ   — t        |«      dk  rt        d«      ‚d| j                  |d   «      z  } t        | |«      |dd Ž  y)z(Dispatches a string command to a method.é   zNot enough argumentszExec%sr   N)ÚlenÚ	ExceptionÚ_CommandifyNameÚgetattr)Úselfr   Úmethods      r   r   zFlockTool.Dispatch   sI   € ä
ˆ4ƒy�1‚}ÜÐ,Ó-Ð-à˜×,Ñ,¨T°!©WÓ5Ñ5€FØ„GˆD�&Ó˜4  ˜8Ò$r
   c                 óB   — |j                  «       j                  dd«      S )z<Transforms a tool name like copy-info-plist to CopyInfoPlistú-Ú )ÚtitleÚreplace)r   Úname_strings     r   r   zFlockTool._CommandifyName   s   € à×ÑÓ×&Ñ& s¨BÓ/Ð/r
   c           
      óì  — t        j                  |t         j                  t         j                  z  t         j                  z  d«      }t
        j                  j                  d«      r+t        j                  dt        j                  dddddd«      }n*t        j                  dt        j                  dddddd«      }t        j                  |t        j                  |«       t        j                  |«      S )z5Emulates the most basic behavior of Linux's flock(1).i¶  ÚaixÚ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   Ú	ExecFlockzFlockTool.ExecFlock#   s£   € ô 
�‰�œ2Ÿ;™;¤r§{¡{Ñ2´2·:±:Ñ=¸uÓ	E€BÜ
‡|�|×Ñ˜uÔ%ô �;‰;�y¤%§-¡-°°A°q¸!¸QÀÓB�bä�;‰;�y¤%§-¡-°°A°q¸!¸QÀÓB€bÜ	‡K�K�”E—M‘M 2Ô&Ü�?‰?˜8Ó$Ð$r
   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r1   © r
   r   r   r      s   „ Ù0ò%ò0ó%r
   r   Ú__main__r   )r5   r(   r   r&   r+   r#   r	   Úobjectr   r2   ÚexitÚargvr6   r
   r   ú<module>r;      sZ   ðñAó Û 	Û Û Û 
òô
%�ô %ð@ ˆzÒØ
€#‡(�(‰4�—‘˜˜�ÓÕð r
   