a0bixSrSSKrSSKrSSKJrJr SSKJr 0qS Sjr S Sjr S Sjr S r SS jr S rg)zWdistutils.dir_util Utility functions for manipulating directories and directory trees.N)DistutilsInternalErrorDistutilsFileError)logc Z[U[5(d[SRU55e[R R U5n/n[R RU5(dUS:XaU$[R[R RU55(aU$[R RU5upVU/nU(aU(a[R RU5(dg[R RU5upVURSU5 U(a-U(a&[R RU5(dMgUHn[R RXX5n[R RU5n [RU 5(aM]US:a[R"SU5 U(d([R "XQ5 UR-U5 S[U 'M U$!["asn U R$[$R&:Xa$[R RU5(d'[)SRXZR*S55eSn A NSn A ff=f) arCreate a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do nothing. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout. Return the list of directories actually created. os.makedirs is not used because: a) It's new to Python 1.5.2, and b) it blows up if the directory already exists (in which case it should silently succeed). z*mkpath: 'name' must be a string (got {!r})rrz creating %szcould not create '{}': {}N) isinstancestrrformatospathnormpathisdir _path_createdgetabspathsplitinsertjoinrinfomkdirOSErrorerrnoEEXISTrargsappend) namemodeverbosedry_run created_dirsheadtailtailsdabs_headexcs ڗ/builddir/build/BUILDROOT/alt-python313-setuptools-69.0.2-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/setuptools/_distutils/dir_util.pymkpathr*s( dC $ 8 ? ? E   77  D !DL ww}}Tdbj.//77==< FE 4 d 3 3ww}}T*  Q 4 d 3 3ww||D$77??4(   X & &  a< HH]D ) $    %"# h+,   U\\1bggmmD6I6I,3::4"N7J s7H-- J*7A)J%%J*c [5nUHOnUR[RR U[RR U555 MQ [ U5H n[XrX4S9 M g)aCreate all the empty directories under 'base_dir' needed to put 'files' there. 'base_dir' is just the name of a directory which doesn't necessarily exist yet; 'files' is a list of filenames to be interpreted relative to 'base_dir'. 'base_dir' + the directory portion of every file in 'files' will be created if it doesn't already exist. 'mode', 'verbose' and 'dry_run' flags are as for 'mkpath()'. r r!N)setaddr rrdirnamesortedr*)base_dirfilesrr r!need_dirfiledirs r) create_treer6WsXuH RWW\\(BGGOOD,ABChs'; cSSKJn U(d2[RR U5(d[ SU-5e[R "U5n U(d [XS9 /n U GHKn [RRX 5n [RRX5nU RS5(aMZU(a[RRU 5(ac[R"U 5nUS:a[R "S X5 U(d[R""X5 U R%U5 M[RR U 5(a"U R'[)U UUUUUUUS 95 GM.U"U UUUUUUS 9 U R%U5 GMN U $![a8n U(a/n Sn A GN[ SRX R55eSn A ff=f) aCopy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it is created with 'mkpath()'. The end result of the copy is that every file in 'src' is copied to 'dst', and directories under 'src' are recursively copied to 'dst'. Return the list of files that were copied or might have been copied, using their output name. The return value is unaffected by 'update' or 'dry_run': it is simply the list of all files under 'src', with the names changed to be under 'dst'. 'preserve_mode' and 'preserve_times' are the same as for 'copy_file'; note that they only apply to regular files, not to directories. If 'preserve_symlinks' is true, symlinks will be copied as symlinks (on platforms that support them!); otherwise (the default), the destination of the symlink will be copied. 'update' and 'verbose' are the same as for 'copy_file'. r) copy_filez&cannot copy tree '%s': not a directoryzerror listing files in '{}': {}N)r z.nfsrzlinking %s -> %sr,)distutils.file_utilr9r rrrlistdirrr strerrorr*r startswithislinkreadlinkrrsymlinkrextend copy_tree)srcdst preserve_modepreserve_timespreserve_symlinksupdater r!r9nameseoutputsnsrc_namedst_name link_dests r)rBrBks:. 277==-- !IC!OPP 3 s$G 77<<'77<<' <<    !9!9 H-I!|+XA 9/ NN8 $ WW]]8 $ $ NN!"%##     NN8 $OR Nm  E$188jjI  sF== G? G:$G::G?c[R"U5Hn[RRX5n[RR U5(a1[RR U5(d [ X15 MwUR[RU45 M UR[RU45 g)zHelper for remove_tree().N) r r;rrrr>_build_cmdtuplerremovermdir)r cmdtuplesfreal_fs r)rQrQs ZZ d& 77== )?)? F .   bii0 1  bhh%&r7c|US:a[R"SU5 U(ag/n[X5 UHUnUS"US5 [RR US5nU[ ;a[ RU5 MUMW g![a"n[R"SX5 SnAMSnAff=f)zRecursively remove an entire directory tree. Any errors are ignored (apart from being reported to stdout if 'verbose' is true). rz'removing '%s' (and everything under it)Nrzerror removing %s: %s) rrrQr rrrpoprwarning) directoryr r!rTcmdrr(s r) remove_treer\s!| :IFII) A F3q6Nggooc!f-G-'!!'*(  A KK/ @ @ AsAB B;B66B;c[RRU5upUSS[R:XaXSS-nU$)z~Take the full path 'path', and make it a relative path. This is useful to make 'path' the second argument to os.path.join(). rrN)r r splitdrivesep)rdrives r)ensure_relativeras? ''$$T*KE AayBFFABx Kr7)irr)rrrrrr)rr)__doc__r rerrorsrr_logrrr*r6rBrQr\rar7r)rfsWG > EP<. Yx'A2r7