
    n&ph                     @    S SK r SSKJr   " S S\\5      rSSS.S jrg)	    N   )AutocommandErrorc                       \ rS rSrSrg)AutomainRequiresModuleError    N)__name__
__module____qualname____firstlineno____static_attributes__r       Z/var/www/html/venv/lib/python3.13/site-packages/setuptools/_vendor/autocommand/automain.pyr   r      s    r   r   r   )argskwargsc                t   ^^ [        U 5      (       a  [        U 5      eU S:X  d  U SL a  Tc  0 mUU4S jnU$ S $ )ay  
This decorator automatically invokes a function if the module is being run
as the "__main__" module. Optionally, provide args or kwargs with which to
call the function. If `module` is "__main__", the function is called, and
the program is `sys.exit`ed with the return value. You can also pass `True`
to cause the function to be called unconditionally. If the function is not
called, it is returned unchanged by the decorator.

Usage:

@automain(__name__)  # Pass __name__ to check __name__=="__main__"
def main():
    ...

If __name__ is "__main__" here, the main function is called, and then
sys.exit called with the return value.
__main__Tc                 >   > [         R                  " U " T0 TD65        g N)sysexit)mainr   r   s    r   automain_decorator$automain.<locals>.automain_decorator6   s    HHT4*6*+r   c                     U $ r   r   )r   s    r   <lambda>automain.<locals>.<lambda>;   s    Dr   )callabler   )moduler   r   r   s    `` r   automainr       sF    ( )&11v~>F	, "!  r   )r   errorsr   	TypeErrorr   r    r   r   r   <module>r#      s(   $  $	"2I 	   !!r   