Rec@sNdZddlZddlZddlZddlmZddlZyddlmZWn!e k r}ddl mZnXddl Z ddl m Z yddlZeZWne k reZnXyddlmZWne k rdZnXyddlmZWne k r%dZnXd d d d d ddddddddddddddddgZdefdYZdefdYZdefd YZd!efd"YZd#efd$YZyeWne k rdZnXdXd'Z!d(Z"d)Z#d*Z$d+Z%d,Z&d-Z'd.Z(ede'ed/Z)edd0Z*d1Z+d2Z,d3Z-d4Z.d5Z/d6d7d7dddd8Z0eed9Z1d7d7dd:Z2ie0dYgd<fd=6e0dZgd?fd@6e0d[gdAfdB6e2gdCfdD6Z3erAe0d\gd?fe3d@idQdRge>gd<fd=6dSge>gdAfdB6dTge=gdCfdD6Z?er2dUge>gd?fe?d@ ignored_names Since copytree() is called recursively, the callable will be called once for each directory that is copied. It returns a list of names relative to the `src` directory that should not be copied. The optional copy_function argument is a callable that will be used to copy each file. It will be called with the source path and the destination path as arguments. By default, copy2() is used, but any function that supports the same signature (like copy()) can be used. iN(R'tlistdirtNoneRHtmakedirsR(RCtislinktreadlinktsymlinktexistsRBR RREtargstEnvironmentErrortappendtstrRR)t WindowsErrort isinstance(R,R-tsymlinkstignoret copy_functiontignore_dangling_symlinksRIRJterrorstnametsrcnametdstnametlinktoterrRA((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyR sD$     $ cCs|rd}n|dkr*d}ny%tjj|rNtdnWn.tk r|tjj|tjdSXg}ytj|}Wn-tjk r|tj|tjnXx|D]}tjj ||}ytj |j }Wntjk rd}nXt j |r@t|||qytj|Wqtjk r|tj|tjqXqWytj|Wn-tjk r|tj|tjnXdS(sRecursively delete a directory tree. If ignore_errors is set, errors are ignored; otherwise, if onerror is set, it is called to handle the error with arguments (func, path, exc_info) where func is os.listdir, os.remove, or os.rmdir; path is the argument to that function that caused it to fail; and exc_info is a tuple returned by sys.exc_info(). If ignore_errors is false and onerror is None, an exception is raised. cWsdS(N((RU((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pytonerrorscWsdS(N((RU((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyRess%Cannot call rmtree on a symbolic linkNi(ROR'R(RQR)tsystexc_infoRNterrorRCtlstatR3R1tS_ISDIRR tremovetrmdir(R(t ignore_errorsReRIR`tfullnameR9((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyR s>       !cCstjj|jtjjS(N(R'R(RDtrstriptsep(R(((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyt _basename*scCs|}tjj|r~t||r;tj||dStjj|t|}tjj|r~td|q~nytj||Wnt k rtjj|rt ||rtd||fnt ||dt t |qt||tj|nXdS(sRecursively move a file or directory to another location. This is similar to the Unix "mv" command. If the destination is a directory or a symlink to a directory, the source is moved inside the directory. The destination path must not already exist. If the destination already exists but is not a directory, it may be overwritten depending on os.rename() semantics. If the destination is on our current filesystem, then rename() is used. Otherwise, src is copied to the destination and then removed. A lot more could be done here... A look at a mv.c shows a lot of the issues this implementation glosses over. Ns$Destination path '%s' already existss.Cannot move a directory '%s' into itself '%s'.R[(R'R(RBR.trenameRCRqRTRR)t _destinsrcR tTrueR R tunlink(R,R-treal_dst((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyR /s$   cCsut|}t|}|jtjjs@|tjj7}n|jtjjsh|tjj7}n|j|S(N(RtendswithR'R(Rpt startswith(R,R-((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyRsWs  cCs^tdks|dkrdSyt|}Wntk rEd}nX|dk rZ|dSdS(s"Returns a gid, given a group name.iN(RROtKeyError(R`tresult((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyt_get_gid`s   cCs^tdks|dkrdSyt|}Wntk rEd}nX|dk rZ|dSdS(s"Returns an uid, given a user name.iN(RRORy(R`Rz((s/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyt_get_uidls   tgzipics|idd6dd6}idd6} tr>d|d s                       Q1  ( =/    6     %