
    TJeE                         d Z ddlZddlZddlZddlZdej
                  fdZdefdZddej                  ej                  e      defdZy)	z!
archspec command line interface
    Nreturnc                  *   t        j                  ddd      } | j                  ddddd	t        j                   
       | j                  dddd       | j                  ddd      }|j                  ddd      }|j                  t               | S )Narchspeczarchspec command line interfaceF)descriptionadd_helpz	--versionz-VzShow the version and exit.versionzarchspec, version )helpactionr   z--helpz-hzShow the help and exit.r	   )r	   r
   commandCOMMAND)titlemetavardestcpuz'archspec command line interface for CPU)r	   r   )run)	argparseArgumentParseradd_argumentr   __version__add_subparsers
add_parserset_defaultsr   )parsersubcommandscpu_commands      ,lib/python3.12/site-packages/archspec/cli.py_make_parserr      s    $$5F
 )$X%9%9$:;   $-FvV'' ( K ((6= ) K
 %M    c                  R    t        t        j                  j                                y)z"Run the `archspec cpu` subcommand.r   )printr   r   host r   r   r   r   /   s    	(,,


r   argvc                     t               }	 |j                  |       }|j                  |j                          y|j                         S # t        $ r}|j                  cY d}~S d}~ww xY w)z*Run the `archspec` command line interface.Nr   )r   
parse_args
SystemExitcoder   
print_helpr   )r#   r   argserrs       r   mainr+   5   s`    ^F  & ||88:  xxs   A
 
	A)A$A)$A))N)__doc__r   typingr   archspec.cpur   r   intr   OptionalListstrr+   r"   r   r   <module>r3      s[   
    h-- >S vv{{3/0 C r   