Decorator for weaving advices on a callable target.

    :param pointcut: condition for weaving advices on joinpointe.
        The condition depends on its type.
    :param ctx: target ctx (instance or class).
    :type pointcut:
        - NoneType: advices are weaved on target.
        - str: target name is compared to pointcut regex.
        - function: called with target in parameter, if True, advices will
            be weaved on target.

    :param depth: class weaving depthing
    :type depth: int

    :param public: (default True) weave only on public members
    :type public: bool

def weave_on(advices, pointcut=None, ctx=None, depth=1, ttl=None):
    """Decorator for weaving advices on a callable target.

    :param pointcut: condition for weaving advices on joinpointe.
        The condition depends on its type.
    :param ctx: target ctx (instance or class).
    :type pointcut:
        - NoneType: advices are weaved on target.
        - str: target name is compared to pointcut regex.
        - function: called with target in parameter, if True, advices will
            be weaved on target.

    :param depth: class weaving depthing
    :type depth: int

    :param public: (default True) weave only on public members
    :type public: bool
    """

    def __weave(target):
        """Internal weave function."""
        weave(
            target=target, advices=advices, pointcut=pointcut,
            ctx=ctx, depth=depth, ttl=ttl
        )

        return target

    return __weave