_i ^ d Z ddlZddlmZ ddlmZ dddd Zdd Z ddZddZ d Z y)zFdistutils.file_util Utility functions for operating on single files. N )DistutilsFileError)logcopyingzhard linkingzsymbolically linking)Nhardsymc d}d} t | d }t j j | r t j | t |d } |j | }|sn |j | ( |r|j |r|j yy# t $ r*}t dj | |j d}~ww xY w# t $ r*}t dj ||j d}~ww xY w# t $ r*}t dj ||j d}~ww xY w# t $ r*}t dj | |j d}~ww xY w# t $ r*}t dj ||j d}~ww xY w# |r|j |r|j w w xY w) a5 Copy the file 'src' to 'dst'; both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' bytes (default 16k). No attempt is made to handle anything apart from regular files. Nrbzcould not open '{}': {}zcould not delete '{}': {}wbzcould not create '{}': {}zcould not read from '{}': {}zcould not write to '{}': {})openOSErrorr formatstrerrorospathexistsunlinkreadwriteclose)srcdstbuffer_sizefsrcfdstebufs /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/file_util.py_copy_file_contentsr s DD* XT?D 77>># # T?D ii, 3 JJLJJL M X$%>%E%Ec1::%VWW X (/66sAJJG $+223 C (299#qzzJ (188ajjI JJLJJL s B% F3 C D F3 E (F3 ,E= =F3 % C.%CCF3 D$%D DF3 E%D??EF3 E:%E55E::F3 = F0%F++F00F3 3'Gc | ddl m} ddlm} m} m}m} t j j | st d| z t j j | r@|} t j j |t j j | }nt j j | } |r( || | s|dk\ rt j d| |dfS t" | }|dk\ rpt j j | t j j | k( rt j( d|| | nt j( d|| | |r|dfS |d k( rZt j j+ | r t j j- | | sy t j. | | |dfS |d k( rYt j j+ | r t j j- | | st j2 | | |dfS t5 | | |s|rVt j | }|rt j6 ||| || f |rt j8 | ||| |dfS # t$ $ r t' d|z w xY w# t0 $ r Y w xY w)a Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a filename. (If the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' is true (the default), the file's mode (type and permission bits, or whatever is analogous on the current platform) is copied. If 'preserve_times' is true (the default), the last-modified and last-access times are copied as well. If 'update' is true, 'src' will only be copied if 'dst' does not exist, or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is None (the default), files are copied. Don't set 'link' on systems that don't support it: 'copy_file()' doesn't check if hard or symbolic linking is available. If hardlink fails, falls back to _copy_file_contents(). Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file contents. Return a tuple (dest_name, copied): 'dest_name' is the actual name of the output file, and 'copied' is true if the file was copied (or would have been copied, if 'dry_run' true). r )newer)ST_ATIMEST_MTIMEST_MODES_IMODEz4can't copy '%s': doesn't exist or not a regular filer z"not copying %s (output up-to-date)z&invalid value '%s' for 'link' argumentz%s %s -> %sr r )distutils._modifiedr! statr" r# r$ r% r r isfiler isdirjoinbasenamedirnamer debug_copy_actionKeyError ValueErrorinfor samefilelinkr symlinkr utimechmod)r r preserve_modepreserve_timesupdater3 verbosedry_runr! r" r# r$ r% diractionsts r copy_filer? F s> R *99 77>># BSH ww}}Sggll3 0 0 56ggooc" eCoa<II:C@QxJd# !| 77C BGG$4$4S$99HH]FC5HH]FC5Qx s#(8(8c(B S!Qx s#(8(8c(BJJsC 8O S! WWS\ HHS2h<H67HHS'"W+./8OU JADHIIJ&