a cz @sPddlmZddlmZddlmZmZmZddZGdddeZ dd Z d S) )DistutilsOptionError)map) edit_config option_base config_filecCs8dD]}||vrt|Sq||gkr4t|S|S)z4Quote an argument for later parsing by shlex.split())"'\#)reprsplit)argcre/workspaces/shunt/resources/test-fastapi/venv/lib/python3.9/site-packages/setuptools/command/alias.pyshquotes rc@sHeZdZdZdZdZdgejZejdgZddZ dd Z d d Z d S) aliasz3Define a shortcut that invokes one or more commandsz0define 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 ) distributionget_option_dictrprint format_aliasrrjoinrrrfilenamedry_run)rrrcommandrrrrun+s&   z alias.runN) __name__ __module__ __qualname____doc__ descriptionZcommand_consumes_argumentsr user_optionsboolean_optionsrrr&rrrrrs rcCsZ||\}}|tdkrd}n,|tdkr0d}n|tdkrBd}nd|}||d|S) Nglobalz--global-config userz--user-config localz --filename=%rr)r)namersourcer%rrrr!Fs    r!N) distutils.errorsrZsetuptools.extern.six.movesrZsetuptools.command.setoptrrrrrr!rrrrs   4