qfc@sRdZddlZddlmZddlmZdZdefdYZdS(sdistutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. iN(t ConfigParser(tCommandsE[distutils] index-servers = pypi [pypi] username:%s password:%s t PyPIRCCommandcBsueZdZdZdZd Zd ZdddefdgZdgZ dZ d Z d Z d Z d ZRS(s;Base command that knows how to handle the .pypirc file shttp://pypi.python.org/pypitpypis repository=trsurl of repository [default: %s]s show-responses&display full response text from servercCstjjtjjddS(sReturns rc file path.t~s.pypirc(tostpathtjoint expanduser(tself((s(/usr/lib64/python2.7/distutils/config.pyt _get_rc_file&scCsd|j}tjtj|tjtjBdd}z|jt||fWd|jXdS(sCreates a default .pypirc file.itwN( R RtfdopentopentO_CREATtO_WRONLYtwritetDEFAULT_PYPIRCtclose(R tusernametpasswordtrctf((s(/usr/lib64/python2.7/distutils/config.pyt _store_pypirc*s  +c Cs3|j}tjj|r/|jd||jp>|j}t}|j||j }d|kr|j dd}g|j dD]$}|j dkr|j ^q}|gkrd|krdg}qiSnxC|D]}i|d6}|j |d|ds