def get_pypi_url(requirement, version=None, base_url=PYPI_BASE_URL):
if version:<EOL><INDENT>return '<STR_LIT>'.format(base=base_url,<EOL>req=requirement,<EOL>version=version)<EOL><DEDENT>else:<EOL><INDENT>return '<STR_LIT>'.format(base=base_url, req=requirement)<EOL><DEDENT>
Get the PyPI url for a given requirement and optional version number and
PyPI base URL. The default base url is 'https://pypi.python.org/pypi'