a [dgM @sDddlmZddlmZmZmZddZGdddeZddZd S) )DistutilsOptionError) edit_config option_base config_filecCs8dD]}||vrt|Sq||gkr4t|S|S)N)"'\#)reprsplit)argcrB/usr/local/lib/python3.9/site-packages/setuptools/command/alias.pyshquotes rc@sDeZdZdZdZdgejZejdgZddZddZ d d Z d S) aliasz0define a shortcut to invoke one or more commandsT)removerzremove (unset) the aliasrcCst|d|_d|_dS)N)rinitialize_optionsargsrselfrrrrs zalias.initialize_optionscCs*t||jr&t|jdkr&tddS)NzFMust specify exactly one argument (the alias name) when using --remove)rfinalize_optionsrlenrrrrrrr!s  zalias.finalize_optionscCs|jd}|js@tdtd|D]}tdt||q&dSt|jdkr|j\}|jrbd}q||vr~tdt||dStd|dSn$|jd}dtt |jdd}t |j d||ii|j dS) NaliaseszCommand Aliasesz---------------zsetup.py aliasrz No alias definition found for %rr ) Z distributionZget_option_dictrprint format_aliasrrjoinmaprrfilenamedry_run)rrrcommandrrrrun)s&   z alias.runN) __name__ __module__ __qualname__ descriptionZcommand_consumes_argumentsrZ user_optionsZboolean_optionsrrr$rrrrrs rcCsZ||\}}|tdkrd}n,|tdkr0d}n|tdkrBd}nd|}||d|S) Nglobalz--global-config userz--user-config localz --filename=%rr)r)namersourcer#rrrrDs    rN) Zdistutils.errorsrZsetuptools.command.setoptrrrrrrrrrrs  4