def get_requires(package, index_file=PIP_INDEX_FILE):
    """
    get require of the package
    :param package: package name
    :type package: str
    :return: a list of requires package
    :rtype: list
    """
    if os.path.exists(index_file):
        with open(index_file) as f:
            index=json.load(f)
            try:
                return index[package]
            except KeyError:# no such package in index file
                raise PipError("Cannot find packages in index file. Try to using 'pip dev update-index' to update index file")

    else:
        raise PipError("Cannot find index file. Try to using 'pip dev update-index' to update index file")

    get require of the package
    :param package: package name
    :type package: str
    :return: a list of requires package
    :rtype: list
    
bin/pip.py