def load_pip_requirements(self, files_map=None, freeze=True):
        if files_map is None:
            files_map = self.default_pip_files
        for group, requirements_txt in files_map.items():
            path = Path(requirements_txt)
            if not path.exists() and group.lower() == "all" and freeze:
                cmd = envoy.run("pip freeze")
                self[group].loads(cmd.std_out)
            elif path.exists():
                self[group].load(path)
def _convertretoglobs(repat):
    """Attempt to convert a regular expression pattern to glob patterns.

    A single regular expression pattern might be converted into multiple
    glob patterns.

    Return None if conversion is unsupported.

    >>> _convertretoglobs("abc*") is None
    True
    >>> _convertretoglobs("xx/yy/(?!zz/kk)")
    ['xx/yy/**', '!xx/yy/zz/kk/**']
    >>> _convertretoglobs("x/y/(?:.*/)?BUCK")
    ['x/y/**/BUCK']
    """
    m = _repat1.match(repat)
    if m:
        prefix, excluded = m.groups()
        return ["%s/**" % prefix, "!%s/%s/**" % (prefix, excluded)]
    m = _repat2.match(repat)
    if m:
        prefix, name = m.groups()
        return ["%s/**/%s" % (prefix, name)]
    return None