1j. h d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m Z mZ ddlmZ ddl mZ ddlmZmZmZmZ ddlmZ ej e Zeez Z ddlZeez Zn # e$ r e d Y nw xY w ddlZeez Zn # e$ r e d Y nw xY wd efdZde d e e fd Z!de e d e"fdZ#de de d e"fdZ$d efdZ%de d dfdZ&ded e"fdZ'd"de de de"d dfdZ(de de d dfdZ)de de dej* de"d df dZ+ d#de de d ee d dfd!Z,dS )$zUtilities related archives. N)IterableListOptional)ZipInfo)InstallationError)BZ2_EXTENSIONSTAR_EXTENSIONS XZ_EXTENSIONSZIP_EXTENSIONS) ensure_dirzbz2 module is not availablezlzma module is not availablereturnc V t j d } t j | | S )zBGet the current umask which involves having to set it temporarily.r )osumask)masks o/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/pip/_internal/utils/unpacking.py current_umaskr , s! 8A;;DHTNNNK pathc * | d d } d| v rJd| v r,| d | d k sd| vr| dd S d| v r| dd S | dgS )N/\ )lstripfindsplitr s r split_leading_dirr 3 s ;;s""4((D d{{ $))C..499T??::t4?O?Ozz#q!!! zz$"""bzr pathsc ^ d}| D ]'}t | \ }}|s dS ||}||k r dS (dS )zyReturns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)NFT)r )r common_prefixr prefixrests r has_leading_dirr% ? sa M (.. 55 ""MM } $ $55 %4r directorytargetc t j | }t j | }t j ||g }||k S )zL Return true if the absolute path of target is within the directory )r r abspathcommonprefix)r&