
    wg	                         d Z ddlZddlZddlmZ ddlmZ ddlm	Z	 d Z
d Zefd	Zdd
Z ej                  ee      Zy)z2Timestamp comparison of files and groups of files.    N)splat   )
zip_strict)DistutilsFileErrorc                     t         j                  j                  |       xs? t         j                  j                  |       t         j                  j                  |      kD  S N)ospathexistsgetmtimesourcetargets     d/home/mcse/projects/flask/flask-venv/lib/python3.12/site-packages/setuptools/_distutils/_modified.py_newerr      sE    ww~~f%% 
 277#3#3F#;;    c                     t         j                  j                  |       s,t        dt         j                  j	                  |        d      t        | |      S )z
    Is source modified more recently than target.

    Returns True if 'source' is modified more recently than
    'target' or if 'target' does not exist.

    Raises DistutilsFileError if 'source' does not exist.
    zfile 'z' does not exist)r	   r
   r   r   abspathr   r   s     r   newerr      sD     77>>&! 6"''//&*A)BBR!STT&&!!r   c                     t        t        |      t        | |            }t        t	        t
        t        |             xs g g fS )a1  
    Filter filenames where sources are newer than targets.

    Walk two filename iterables in parallel, testing if each source is newer
    than its corresponding target.  Returns a pair of lists (sources,
    targets) where source is newer than target, according to the semantics
    of 'newer()'.
    )filterr   r   tuplemaplistzip)sourcestargetsr   newer_pairss       r   newer_pairwiser   !   s;     uz'7'CDKT3,-.:2r(:r   c                     fddk(  rt         j                  j                  nd}t         j                  j                         xs t        fdt	        ||       D              S )a  
    Is target out-of-date with respect to any file in sources.

    Return True if 'target' is out-of-date with respect to any file
    listed in 'sources'. In other words, if 'target' exists and is newer
    than every file in 'sources', return False; otherwise return True.
    ``missing`` controls how to handle a missing source file:

    - error (default): allow the ``stat()`` call to fail.
    - ignore: silently disregard any missing source files.
    - newer: treat missing source files as "target out of date". This
      mode is handy in "dry-run" mode: it will pretend to carry out
      commands that wouldn't work because inputs are missing, but
      that doesn't matter because dry-run won't run the commands.
    c                 R    dk(  xr  t         j                  j                  |        S )Nr   )r	   r
   r   )r   missings    r   missing_as_newerz%newer_group.<locals>.missing_as_newer?   s#    '!@"''..*@&@@r   ignoreNc              3   J   K   | ]  } |      xs t        |        y wr   )r   ).0r   r#   r   s     r   	<genexpr>znewer_group.<locals>.<genexpr>C   s-      - 	 :F66$::-s    #)r	   r
   r   anyr   )r   r   r"   ignoredr#   s    `` @r   newer_groupr*   .   sY    "A !(8 3bggnnGww~~f%%  -Wg.- * r   )r   )error)__doc__	functoolsos.pathr	   jaraco.functoolsr   compat.py39r   errorsr   r   r   r   r*   partialnewer_pairwise_group r   r   <module>r5      sG    8   " # &" ,1 
;6 )y(({K r   