
    Pi[                    p    d Z ddlmZ ddlmZmZ dgZ eh d          Z eh d          Z	ddZ
ddZdS )z
Lipo command handler for Dippy.

macOS universal binary tool.
- -archs, -info, -detailed_info, -verify_arch are safe read operations
- -create, -extract, -extract_family, -remove, -replace, -thin write to -output
    )annotations)ClassificationHandlerContextlipo>   -info-archs-verify_arch-detailed_info>   -thin-create-remove-extract-replace-extract_familytokens	list[str]return
str | Nonec                ~    t          |           D ],\  }}|dv r#|dz   t          |           k     r| |dz            c S -dS )z*Extract the output file from -output flag.>   -o-output   N)	enumeratelen)r   its      //root/projects/gits/Dippy/src/dippy/cli/lipo.py_extract_output_filer      sW    &!! ! !1!!!a!ec&kk&9&9!a%=   4    ctxr   r   c                   | j         }d}|dd         D ],}|t          v rt          dd|           c S |t          v rd}-|r5t	          |          }|rt          dd|f	          S t          d
d          S t          dd          S )zClassify lipo command.Fr   Nallowzlipo )descriptionTr   )r#   redirect_targetsask)r   SAFE_COMMANDSr   WRITE_COMMANDSr   )r    r   has_write_commandr   output_files        r   classifyr*       s    ZFABBZ % %!'{q{{CCCCCC $ 9*622 	!""-   
 e8888'v6666r   N)r   r   r   r   )r    r   r   r   )__doc__
__future__r   	dippy.clir   r   COMMANDS	frozensetr&   r'   r   r*    r   r   <module>r1      s     # " " " " " 4 4 4 4 4 4 4 48 	OOOPP NNN 
   7 7 7 7 7 7r   