Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
alt
/
python36
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
pep517
/
__pycache__
[ HOME ]
Exec
Submit
File Name : dirtools.cpython-36.pyc
3 �Rei � @ sZ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZejdd� �Zdd� Z dd� Z dS )� Nc c s$ t j� } z | V W dtj| � X dS )z2Create a temporary directory in a context manager.N)�tempfile�mkdtemp�shutil�rmtree)�td� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/dirtools.py�tempdir s r c O sB yt j| |�S tk r< } z|jtjkr,� W Y dd}~X nX dS )zWLike `mkdir`, but does not raise an exception if the directory already exists. N)�os�mkdir�OSError�errno�EEXIST)�args�kwargs�excr r r �mkdir_p s r c C s� t j� }tj|d�}x�tj| �D ]z\} }}x8|D ]0}tjj| |�}tjj|| �}|j |d d� q0W x4|D ],}tjj| |�}tjj|| �}|j ||� qjW q W |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 Zfs_path�rel_pathr r r �dir_to_zipfile s r&