K i dZddlmZddlZddlZddlmZmZddl m Z m Z ddl m Z ddlmZdd lmZe d d Ze d d ZdZ ddZef ddZ d ddZej0eeZy)z2Timestamp comparison of files and groups of files.) annotationsN)CallableIterable)LiteralTypeVar)splat) zip_strict)DistutilsFileError _SourcesT3str | bytes | os.PathLike[str] | os.PathLike[bytes])bound _TargetsTctjj| xs?tjj|tjj|kDSN)ospathexistsgetmtimesourcetargets e/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/setuptools/_distutils/_modified.py_newerrsEww~~f% %   277#3#3F#;;ctjj|s,tdtjj |dt ||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. zfile z does not exist)rrrr abspathrrs rnewerrsC 77>>& ! 5)@(C?!STT && !!rctt|t||}tt t t |xsggfS)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()'. )filterrr tuplemaplistzip)sourcestargetsr newer_pairss rnewer_pairwiser(/s;uz'7'CDK T3 ,- . :2r(:rcfddk(rtjjnd}tjj xstfdt ||DS)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. cRdk(xr tjj| S)Nr)rrr)rmissings rmissing_as_newerz%newer_group..missing_as_newerUs#'!@"''..*@&@@rignoreNc3JK|]}|xs t|ywr)r).0rr,rs r znewer_group..Ys--   :F66$::-s #)rrranyr )r%rr+ignoredr,s `` @r newer_groupr3@sY*A!(8 3bggnnGww~~f% % -Wg.-*r)r)rr rr returnbool)r%zIterable[_SourcesT]r&zIterable[_TargetsT]rz&Callable[[_SourcesT, _TargetsT], bool]r4z'tuple[list[_SourcesT], list[_TargetsT]])error)r%z=Iterable[str | bytes | os.PathLike[str] | os.PathLike[bytes]]rr r+z#Literal['error', 'ignore', 'newer']r4r5)__doc__ __future__r functoolsos.pathrcollections.abcrrtypingrrjaraco.functoolsr compat.py39r errorsr r rrrr(r3partialnewer_pairwise_grouprrrCs8".#"#& L   L   " ?" ?" "*5:; ; ; 2;- ;(4; J ?1 >)y(({Kr