def get_repository(pkg_name, site_packages=SITE_PACKAGES_FOLDER, verbose=False):
    """
    The corresponding repository based on the given package name.
    :param pkg_name: It can be one of the four following options:
    1. An URL pointing to an archive file
    2. Path to a local archive file
    3. A owner/repo pair pointing to a GitHub repo
    4. A name representing a PyPI package.
    :param site_packages: folder containing the site-packages
    :type site_packages: str
    :param verbose: enable additional output
    :type verbose: bool
    """

    if pkg_name.startswith('http://') \
    or pkg_name.startswith('https://') \
    or pkg_name.startswith('ftp://'):  # remote archive file
        print('Working on URL repository ...')
        return UrlRepository(site_packages=site_packages, verbose=verbose)

    # local archive file
    elif os.path.isfile(pkg_name) and \
    (pkg_name.endswith('.zip') or pkg_name.endswith('.gz') or pkg_name.endswith('.bz2')):
        print('Working on Local repository ...')
        return LocalRepository(site_packages=site_packages, verbose=verbose)

    elif '/' in pkg_name:  # github, e.g. selectel/pyte
        print('Working on GitHub repository ...')
        return GitHubRepository(site_packages=site_packages, verbose=verbose)

    else:  # PyPI
        return PyPIRepository(site_packages=site_packages, verbose=verbose)

    The corresponding repository based on the given package name.
    :param pkg_name: It can be one of the four following options:
    1. An URL pointing to an archive file
    2. Path to a local archive file
    3. A owner/repo pair pointing to a GitHub repo
    4. A name representing a PyPI package.
    :param site_packages: folder containing the site-packages
    :type site_packages: str
    :param verbose: enable additional output
    :type verbose: bool
    
bin/pip.py