# Path: src/rituals/util/_compat.py
# PY2 = sys.version_info[0] == 2
# PYPY = hasattr(sys, 'pypy_translation_info')
#     def reraise(tp, value, tb=None):
#     def decode_filename(filename):
#     def implements_iterator(cls):
#     def implements_to_string(cls):
#     def encode_filename(filename):
#     def decode_filename(filename):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def isodate(datestamp=None, microseconds=False):
#     class metaclass(meta):


import os
import re
from ._compat import string_types
    """ Ant-style file and directory matching.

        Produces an iterator of all of the files that match the provided patterns.
        Note that directory matches must end with a slash, and if they're exclusions,
        they won't be scanned (which prunes anything in that directory that would
        otherwise match).

        Directory specifiers:
            **              matches zero or more directories.
            /               path separator.

        File specifiers:
            *               glob style wildcard.
            [chars]         inclusive character sets.
            [^chars]        exclusive character sets.

        Examples:
            **/*.py         recursively match all python files.
            foo/**/*.py     recursively match all python files in the 'foo' directory.
            *.py            match all the python files in the current directory.
            */*.txt         match all the text files in top-level directories.
            foo/**/*        all files under directory 'foo'.
            */              top-level directories.
            foo/            the directory 'foo' itself.
            **/foo/         any directory named 'foo'.
            **/.*           hidden files.
            **/.*/          hidden directories.
    """

    def __init__(self, root, patterns):

# Path: src/rituals/util/_compat.py
# PY2 = sys.version_info[0] == 2
# PYPY = hasattr(sys, 'pypy_translation_info')
#     def reraise(tp, value, tb=None):
#     def decode_filename(filename):
#     def implements_iterator(cls):
#     def implements_to_string(cls):
#     def encode_filename(filename):
#     def decode_filename(filename):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def isodate(datestamp=None, microseconds=False):
#     class metaclass(meta):


# Path: src/rituals/util/antglob.py
import os
import re
from ._compat import string_types

    """ Ant-style file and directory matching.

        Produces an iterator of all of the files that match the provided patterns.
        Note that directory matches must end with a slash, and if they're exclusions,
        they won't be scanned (which prunes anything in that directory that would
        otherwise match).

        Directory specifiers:
            **              matches zero or more directories.
            /               path separator.

        File specifiers:
            *               glob style wildcard.
            [chars]         inclusive character sets.
            [^chars]        exclusive character sets.

        Examples:
            **/*.py         recursively match all python files.
            foo/**/*.py     recursively match all python files in the 'foo' directory.
            *.py            match all the python files in the current directory.
            */*.txt         match all the text files in top-level directories.
            foo/**/*        all files under directory 'foo'.
            */              top-level directories.
            foo/            the directory 'foo' itself.
            **/foo/         any directory named 'foo'.
            **/.*           hidden files.
            **/.*/          hidden directories.
    """

    def __init__(self, root, patterns):

        if isinstance(patterns, string_types):