<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
Ävh   ã               @   sB   d dl Z d dlZd dlmZmZ d dljjZG dd„ dejƒZdS )é    N)ÚproductÚstarmapc               @   sZ   e Zd ZdZdd„ Zdd„ Zdd„ Zedd	„ ƒZd
d„ Z	edd„ ƒZ
ddd„Zdd„ ZdS )Úinstall_libz9Don't add compiled flags to filenames of non-Python filesc             C   s&   | j ƒ  | jƒ }|d k	r"| j|ƒ d S )N)ZbuildÚinstallZbyte_compile)ÚselfÚoutfiles© r   ú!/usr/lib/python3.6/install_lib.pyÚrun
   s    zinstall_lib.runc                s4   ‡ fdd„ˆ j ƒ D ƒ}t|ˆ jƒ ƒ}ttˆ j|ƒƒS )z—
        Return a collections.Sized collections.Container of paths to be
        excluded for single_version_externally_managed installations.
        c             3   s"   | ]}ˆ j |ƒD ]
}|V  qqd S )N)Ú_all_packages)Ú.0Zns_pkgÚpkg)r   r   r	   ú	<genexpr>   s   z-install_lib.get_exclusions.<locals>.<genexpr>)Ú_get_SVEM_NSPsr   Ú_gen_exclusion_pathsÚsetr   Ú_exclude_pkg_path)r   Zall_packagesZ
excl_specsr   )r   r	   Úget_exclusions   s    
zinstall_lib.get_exclusionsc             C   s$   |j dƒ|g }tjj| jf|žŽ S )zw
        Given a package name and exclusion path within that package,
        compute the full exclusion path.
        Ú.)ÚsplitÚosÚpathÚjoinZinstall_dir)r   r   Zexclusion_pathÚpartsr   r   r	   r      s    zinstall_lib._exclude_pkg_pathc             c   s$   x| r| V  | j dƒ\} }}qW dS )zn
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        r   N)Ú
rpartition)Zpkg_nameÚsepZchildr   r   r	   r   '   s    zinstall_lib._all_packagesc             C   s,   | j jsg S | jdƒ}|j}|r(| j jS g S )z‰
        Get namespace packages (list) but only for
        single_version_externally_managed installations and empty otherwise.
        r   )ZdistributionZnamespace_packagesZget_finalized_commandZ!single_version_externally_managed)r   Zinstall_cmdZsvemr   r   r	   r   1   s
    
zinstall_lib._get_SVEM_NSPsc              c   sb   dV  dV  dV  t tdƒs dS tjjddtjƒ  ƒ} | d V  | d	 V  | d
 V  | d V  dS )zk
        Generate file paths to be excluded for namespace packages (bytecode
        cache files).
        z__init__.pyz__init__.pycz__init__.pyoÚget_tagNÚ__pycache__z	__init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)ÚhasattrÚimpr   r   r   r   )Úbaser   r   r	   r   A   s    



z install_lib._gen_exclusion_pathsé   r   c       	         sj   |r|r| st ‚| jƒ ‰ ˆ s.tjj| ||ƒS ddlm} ddlm‰ g ‰‡ ‡‡fdd„}||||ƒ ˆS )Nr   )Úunpack_directory)Úlogc                s<   |ˆ krˆj d|ƒ dS ˆjd| tjj|ƒƒ ˆj|ƒ |S )Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)ÚwarnÚinfor   r   ÚdirnameÚappend)ÚsrcÚdst)Úexcluder#   r   r   r	   Úpfg   s    
z!install_lib.copy_tree.<locals>.pf)	ÚAssertionErrorr   Úorigr   Ú	copy_treeZsetuptools.archive_utilr"   Z	distutilsr#   )	r   ZinfileZoutfileZpreserve_modeZpreserve_timesZpreserve_symlinksÚlevelr"   r+   r   )r*   r#   r   r	   r.   V   s    
zinstall_lib.copy_treec                s.   t jj| ƒ}| jƒ ‰ ˆ r*‡ fdd„|D ƒS |S )Nc                s   g | ]}|ˆ kr|‘qS r   r   )r   Úf)r*   r   r	   ú
<listcomp>x   s    z+install_lib.get_outputs.<locals>.<listcomp>)r-   r   Úget_outputsr   )r   Zoutputsr   )r*   r	   r2   t   s
    zinstall_lib.get_outputsN)r!   r!   r   r!   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   Ústaticmethodr   r   r   r.   r2   r   r   r   r	   r      s   

r   )	r   r   Ú	itertoolsr   r   Zdistutils.command.install_libZcommandr   r-   r   r   r   r	   Ú<module>   s   