zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
U
H=®diã@sZddlZddlZddlZddlZddlZddlZddlZejdd„ƒZdd„Z    dd„Z
dS)éNc    cs$t ¡}z
|VW5t |¡XdS)z2Create a temporary directory in a context manager.N)ÚtempfileÚmkdtempÚshutilÚrmtree)Útd©rúRD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/pep517/dirtools.pyÚtempdir
s
r    c
OsDztj||ŽWStk
r>}z|jtjkr.‚W5d}~XYnXdS)zWLike `mkdir`, but does not raise an exception if the
    directory already exists.
    N)ÚosÚmkdirÚOSErrorÚerrnoÚEEXIST)ÚargsÚkwargsÚexcrrrÚmkdir_ps
 rcCs–t ¡}t |d¡}t |¡D]r\}}}|D]0}tj ||¡}tj ||¡}|     |dd¡q,|D],}tj ||¡}tj ||¡}| 
||¡qbq|S)z0Construct an in-memory zip file for a directory.Úwú/Ú) ÚioÚBytesIOÚzipfileÚZipFiler
ÚwalkÚpathÚjoinÚrelpathÚwritestrÚwrite)ÚrootÚbufferÚzip_fileÚdirsÚfilesrZfs_pathÚrel_pathrrrÚdir_to_zipfiles r&) r
rÚ
contextlibrrr rÚcontextmanagerr    rr&rrrrÚ<module>s