HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_vendor/pep517/__pycache__/dirtools.cpython-310.pyc
o

@%Nei�@sZddlZddlZddlZddlZddlZddlZddlZejdd��Zdd�Z	dd�Z
dS)�Nc	cs.�t��}z|VWt�|�dSt�|�w)z2Create a temporary directory in a context manager.N)�tempfile�mkdtemp�shutil�rmtree)�td�r�=/usr/lib/python3/dist-packages/pip/_vendor/pep517/dirtools.py�tempdir
s
�r	c
OsHz	tj|i|��WSty#}z|jtjkr�WYd}~dSd}~ww)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]9\}}}|D]}tj�||�}tj�||�}|�	|dd�q|D]}tj�||�}tj�||�}|�
||�q1q|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�filesr�fs_path�rel_pathrrr�dir_to_zipfiles�r')r
r�
contextlibrrr
r�contextmanagerr	rr'rrrr�<module>s