def get_pypi_auth(configfile='<STR_LIT>'):
pypi_cfg = ConfigParser()<EOL>if pypi_cfg.read(os.path.expanduser(configfile)):<EOL><INDENT>try:<EOL><INDENT>user = pypi_cfg.get('<STR_LIT>', '<STR_LIT:username>')<EOL>pwd = pypi_cfg.get('<STR_LIT>', '<STR_LIT:password>')<EOL>return user, pwd<EOL><DEDENT>except ConfigError:<EOL><INDENT>notify.warning("<STR_LIT>"<EOL>"<STR_LIT>".format(configfile))<EOL><DEDENT><DEDENT>return None<EOL>
Read auth from pip config.