Viewing File: /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/alias.cpython-36.opt-1.pyc
3
Xoöhz ã @ sP d dl mZ d dlmZ d dlmZmZmZ dd„ ZG dd„ deƒZ dd „ Z
d
S )é )ÚDistutilsOptionError)Úmap)Úedit_configÚoption_baseÚconfig_filec C s8 xdD ]}|| krt | ƒS qW | jƒ | gkr4t | ƒS | S )z4Quote an argument for later parsing by shlex.split()ú"ú'ú\ú#)r r r r
)ÚreprÚsplit)ÚargÚc© r ú/usr/lib/python3.6/alias.pyÚshquote s
r c @ sH e Zd ZdZdZdZdgej Zejdg Zdd„ Z d d
„ Z
dd„ Zd
S )Úaliasz3Define a shortcut that invokes one or more commandsz0define a shortcut to invoke one or more commandsTÚremoveÚrúremove (unset) the aliasc C s t j| ƒ d | _d | _d S )N)r Úinitialize_optionsÚargsr )Úselfr r r r s
zalias.initialize_optionsc C s* t j| ƒ | jr&t| jƒdkr&tdƒ‚d S )Né zFMust specify exactly one argument (the alias name) when using --remove)r Úfinalize_optionsr Úlenr r )r r r r r # s
zalias.finalize_optionsc C sÔ | j jdƒ}| jsDtdƒ tdƒ x|D ]}tdt||ƒƒ q(W d S t| jƒdkr”| j\}| jrfd }q¸||kr‚tdt||ƒƒ d S td| ƒ d S n$| jd }djtt | jdd … ƒƒ}t
| jd||ii| jƒ d S ) NÚaliaseszCommand Aliasesz---------------zsetup.py aliasr z No alias definition found for %rr ú )
ZdistributionZget_option_dictr ÚprintÚformat_aliasr r Újoinr r r ÚfilenameZdry_run)r r r Úcommandr r r Úrun+ s&