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
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pip
/
_internal
/
utils
/
__pycache__
[ HOME ]
Exec
Submit
File Name : unpacking.cpython-312.pyc
� p�/i�2 � �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl mZ ddl mZ ddl mZ ddlmZmZmZmZ ddlmZ ej, e� Zeez Z ddlZeez Z ddlZeez Zdd�Zdd�Zdd �Z dd�Z!dd�Z"dd�Z#dd�Z$ddd�Z%dd�Z&d d�Z' d!d�Z( d" d#d�Z)y# e$ r ej9 d � Y �gw xY w# e$ r ej9 d � Y �yw xY w)$zUtilities related archives.� )�annotationsN)�Iterable)�ZipInfo)�InstallationError)�BZ2_EXTENSIONS�TAR_EXTENSIONS� XZ_EXTENSIONS�ZIP_EXTENSIONS)� ensure_dirzbz2 module is not availablezlzma module is not availablec �Z � t j d� } t j | � | S )zBGet the current umask which involves having to set it temporarily.r )�os�umask)�masks �L/opt/hc_python/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py� current_umaskr - s � � �8�8�A�;�D��H�H�T�N��K� c � � | j d� j d� } d| v r=d| v r#| j d� | j d� k sd| vr| j dd� S d| v r| j dd� S | dgS )N�/�\� � )�lstrip�find�split��paths r �split_leading_dirr 4 sz � ��;�;�s��"�"�4�(�D� �d�{� ���$�)�)�C�.�4�9�9�T�?�:�t�4�?O��z�z�#�q�!�!� ����z�z�$��"�"��b�z�r c �R � d}| D ] }t |� \ }}|s y|�|}�||k7 s� y y)zyReturns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)NFT)r )�paths� common_prefixr �prefix�rests r �has_leading_dirr# @ sB � � �M���(��.������ � "�"�M� �}� $�� � r c �� � t j j | � }t j j |� }t j j ||g� }||k( S )zL Return true if the absolute path of target is within the directory )r r �abspath�commonprefix)� directory�target� abs_directory� abs_targetr! s r �is_within_directoryr+ O sL � � �G�G�O�O�I�.�M�������(�J� �W�W� !� !�=�*�"=� >�F��]�"�"r c �$ � dt � z dz S )Ni� �I )r � r r �!_get_default_mode_plus_executabler/ Z s � ��M�O�#�#�e�+�+r c �@ � t j | t � � y)zx Make file present at path have execute for user/group/world (chmod +x) is no-op on windows per python docs N)r �chmodr/ r s r �2set_extracted_file_to_default_mode_plus_executabler2 ^ s � � �H�H�T�4�6�7r c �r � | j dz }t |xr t j |� xr |dz � S )N� r- )� external_attr�bool�stat�S_ISREG)�info�modes r �zip_item_is_executabler; f s6 � �����#�D� ��<����d�+�<��u��=�=r c � � t |� t | d� } t j |d�� }t |j � � xr |}|j � D �] }|j }|}|rt |� d }t j j ||� }t j j |� } t ||� sd} t | j | ||� � �|j! d� rt |� ��t | � |j |� } t |d� 5 }t# j$ ||� ddd� |j'