def get_pkg_name(req):
    """Return the name of the package in the given requirement text."""
    # strip env markers
    req = req.partition(';')[0]
    # strip version
    req = req.partition('==')[0]
    req = req.partition('>=')[0]
    return req