Check versions of opinel and boto3
    :param script_path:
    :return:

def check_requirements(script_path, requirements_file = None):
    """
    Check versions of opinel and boto3
    :param script_path:
    :return:
    """
    script_dir = os.path.dirname(script_path)
    opinel_min_version = opinel_max_version = boto3_min_version = boto3_max_version = None
    # Requirements file is either next to the script or in data/requirements
    if not requirements_file:
        requirements_file = os.path.join(script_dir, 'data/requirements.txt')
        if not os.path.isfile(requirements_file):
            requirements_file = os.path.join(script_dir, 'requirements.txt')
    with open(requirements_file, 'rt') as f:
        for requirement in f.readlines():
            opinel_requirements = re_opinel.match(requirement)
            if opinel_requirements:
                opinel_requirements = opinel_requirements.groups()
                opinel_min_version = opinel_requirements[0]
                opinel_max_version = opinel_requirements[1]
            boto3_requirements = re_boto3.match(requirement)
            if boto3_requirements:
                boto3_requirements = boto3_requirements.groups()
                boto3_min_version = boto3_requirements[0]
                boto3_max_version = boto3_requirements[1]
    if not check_versions(opinel_min_version, OPINEL_VERSION, opinel_max_version, 'opinel'):
        return False
    if not check_versions(boto3_min_version, boto3.__version__, boto3_max_version, 'boto3'):
        return False
    return True