tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
[\¬Qc@s´dZdZddlZddlZddlmZmZddlmZia    dddd    „Z
dddd
„Z ddddddd „Z d „Z ddd „Zd„ZdS(sWdistutils.dir_util
 
Utility functions for manipulating directories and directory trees.s$Id$iÿÿÿÿN(tDistutilsFileErrortDistutilsInternalError(tlogiÿiic
Csèt|tƒs"td|f‚ntjj|ƒ}g}tjj|ƒsX|dkr\|Stjtjj    |ƒƒr{|Stjj
|ƒ\}}|g}xK|ré|rétjj|ƒ rétjj
|ƒ\}}|j d|ƒqŸWx÷|D]ï}tjj ||ƒ}tjj    |ƒ}    tj|    ƒr3qñn|dkrRt jd|ƒn|sÖytj||ƒWnWtk
rÅ}
|
jtjkoŸtjj|ƒsÆtd||
jdfƒ‚qÆnX|j|ƒndt|    <qñW|S(sìCreate 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.
    s(mkpath: 'name' must be a string (got %r)tiis creating %sscould not create '%s': %siÿÿÿÿ(t
isinstancet
basestringRtostpathtnormpathtisdirt _path_createdtgettabspathtsplittinserttjoinRtinfotmkdirtOSErrorterrnotEEXISTRtargstappend( tnametmodetverbosetdry_runt created_dirstheadttailttailstdtabs_headtexc((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pytmkpaths>    "  $!c    Cs€i}x3|D]+}d|tjj|tjj|ƒƒ<q W|jƒ}|jƒx'|D]}t||d|d|ƒqYWdS(s¯Create all the empty directories under 'base_dir' needed to put 'files'
    there.
 
    'base_dir' is just the a 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()'.
    iRRN(RRRtdirnametkeystsortR"(    tbase_dirtfilesRRRtneed_dirtfilet    need_dirstdir((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pyt create_treeRs  ) 
 cCsåddlm}| r:tjj|ƒ r:td|‚nytj|ƒ}    Wn>tjk
r\}
} |rwg}    qŽtd|| f‚nX|s§t|d|ƒng} x1|    D])} tjj    || ƒ}tjj    || ƒ}| j
dƒrùq´n|rktjj |ƒrktj |ƒ}|dkrBt jd||ƒn|s[tj||ƒn| j|ƒq´tjj|ƒr®| jt||||||d|d    |ƒƒq´||||||d|d    |ƒ| j|ƒq´W| S(
sCopy 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'.
    iÿÿÿÿ(t    copy_files&cannot copy tree '%s': not a directoryserror listing files in '%s': %sRs.nfsislinking %s -> %sR(tdistutils.file_utilR-RRR    RtlistdirterrorR"Rt
startswithtislinktreadlinkRRtsymlinkRtextendt    copy_tree(tsrctdstt preserve_modetpreserve_timestpreserve_symlinkstupdateRRR-tnamesRterrstrtoutputstntsrc_nametdst_namet    link_dest((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pyR6gsH          cCs”xwtj|ƒD]f}tjj||ƒ}tjj|ƒr`tjj|ƒ r`t||ƒq|jtj|fƒqW|jtj    |fƒdS(sHelper for remove_tree().N(
RR/RRR    R2t_build_cmdtupleRtremovetrmdir(Rt    cmdtuplestftreal_f((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pyRD¬s %cCsÙddlm}|dkr/tjd|ƒn|r9dSg}t||ƒx†|D]~}yB|d|dƒtjj|dƒ}|tkršt|=nWqSt    t
fk
rÐ}tj ||d|ƒƒqSXqSWdS(sRecursively remove an entire directory tree.
 
    Any errors are ignored (apart from being reported to stdout if 'verbose'
    is true).
    iÿÿÿÿ(tgrok_environment_erroris'removing '%s' (and everything under it)Niserror removing %s: ( tdistutils.utilRJRRRDRRR R
tIOErrorRtwarn(t    directoryRRRJRGtcmdR R!((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pyt remove_tree¶s         cCsCtjj|ƒ\}}|dd!tjkr?||d}n|S(s†Take the full path 'path', and make it a relative path.
 
    This is useful to make 'path' the second argument to os.path.join().
    ii(RRt
splitdrivetsep(Rtdrive((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pytensure_relativeÐs(t__doc__t __revision__RRtdistutils.errorsRRt    distutilsRR
R"R,R6RDRPRT(((sZ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/dir_util.pyt<module>s  ?D