{5 j d dl Z d dlZd dlZd dlZd dlZd dlZd dlZej d Zd Z d Z
dS ) Nc # K t j } | V t j | dS # t j | w xY w)z2Create a temporary directory in a context manager.N)tempfilemkdtempshutilrmtree)tds /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/pep517/dirtools.pytempdirr
sP
B
b
bs 1 Ac t j | i |S # t $ r!}|j t j k r Y d}~dS d}~ww xY w)zWLike `mkdir`, but does not raise an exception if the
directory already exists.
N)osmkdirOSErrorerrnoEEXIST)argskwargsexcs r mkdir_pr sa x(((( 9$$ %$$$$$s
>9>c t j }t j |d }t j | D ]\ } }}|D ][}t j | | }t j || }| |dz d \|D ]X}t j | | }t j || }|
|| Y|S )z0Construct an in-memory zip file for a directory.w/ )ioBytesIOzipfileZipFiler walkpathjoinrelpathwritestrwrite)rootbufferzip_filedirsfilesr fs_pathrel_paths r dir_to_zipfiler* s
Z\\Fvs++HWT]] . .dE 2 2Dgll4..Gww55Hhnb1111 . .Dgll4..Gww55HNN7H---- . O )r r
contextlibr r r r contextmanagerr
r r* r+ r