a „oek ã@spdZddlZddlZddlmZddlmZddlm Z dd„Z d d „Z e fd d „Z ddd„Z eje e d�ZdS)z2Timestamp comparison of files and groups of files.éNé)ÚDistutilsFileError)Ú zip_strict)ÚsplatcCs&tj |¡ p$tj |¡tj |¡kS©N)ÚosÚpathÚexistsÚgetmtime©ÚsourceÚtarget©rú@C:\Program Files\Certbot\pkgs\setuptools\_distutils\_modified.pyÚ_newer sÿrcCs*tj |¡s tdtj |¡ƒ‚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. zfile '%s' does not exist)rrr rÚabspathrr rrrÚnewers rcCs.tt|ƒt||ƒƒ}tttt|Žƒƒp,ggfS)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ÚtupleÚmapÚlistÚzip)ÚsourcesÚtargetsrZ newer_pairsrrrÚnewer_pairwise s rÚerrorcs>‡fdd„‰ˆdkrtjjnd}t‡‡fdd„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. csˆdkotj |¡ S)Nr)rrr )r )ÚmissingrrÚmissing_as_newer>sz%newer_group..missing_as_newerÚignoreNc3s |]}ˆ|ƒpt|ˆƒVqdSr)r)Ú.0r )rr rrÚ Bsÿznewer_group..)rrr Úanyr)rr rZignoredr)rrr rÚ newer_group-s  þr")r)r)Ú__doc__Ú functoolsZos.pathrÚerrorsrZ py39compatrÚ _functoolsrrrrr"ÚpartialZnewer_pairwise_grouprrrrÚs