
    ,h                        d dl mZ d dlZd dlZd dlmZmZ ddlmZ ddl	m
Z
 d dlmc mZ  G d dej                        Zy)	    )annotationsN)productstarmap   )StrPath)Distributionc                      e Zd ZU dZded<   ddZd Zd Zed        Z	d Z
ed	        Z	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd
Zd Zy)install_libz9Don't add compiled flags to filenames of non-Python filesr   distributionc                l    | j                          | j                         }|| j                  |       y y N)buildinstallbyte_compile)selfoutfiless     `/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/setuptools/command/install_lib.pyrunzinstall_lib.run   s/    

<<>h'      c                      f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  N   K   | ]  }j                  |      D ]  }|   y wr   )_all_packages).0ns_pkgpkgr   s      r   	<genexpr>z-install_lib.get_exclusions.<locals>.<genexpr>   s9      
))&1
  

s   "%)_get_SVEM_NSPsr   _gen_exclusion_pathssetr   _exclude_pkg_path)r   all_packages
excl_specss   `  r   get_exclusionszinstall_lib.get_exclusions   sJ    

--/
 \4+D+D+FG
7411:>??r   c                    |j                  d      |gz   }t        j                  j                  | j                  g| S )zw
        Given a package name and exclusion path within that package,
        compute the full exclusion path.
        .)splitospathjoininstall_dir)r   r   exclusion_pathpartss       r   r    zinstall_lib._exclude_pkg_path'   s7    
 		#.!11ww||D,,5u55r   c              #  J   K   | r|  | j                  d      \  } }}| ryyw)zn
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        r%   N)
rpartition)pkg_name_sep_childs      r   r   zinstall_lib._all_packages/   s,      N%-%8%8%="HdF s   ##c                    | 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   )r   namespace_packagesget_finalized_command!single_version_externally_managed)r   install_cmdsvems      r   r   zinstall_lib._get_SVEM_NSPs9   sL       33I00;<<7;t  33CCr   c               #     K   d d d t        t        d      syt        j                  j	                  ddt        j
                  j                  z         } | dz    | d	z    | d
z    | dz    yw)zk
        Generate file paths to be excluded for namespace packages (bytecode
        cache files).
        z__init__.pyz__init__.pycz__init__.pyoimplementationN__pycache__z	__init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)hasattrsysr'   r(   r)   r9   	cache_tag)bases    r   r   z install_lib._gen_exclusion_pathsI   sw      s,-ww||M;9K9K9U9U+UVVmVm\!!\!!s   A6A8c                   	
 |sJ |sJ |rJ | j                         		s!t        j                  j                  | ||      S ddlm} ddlm
 g d	
fd} ||||       S )Nr   )unpack_directory)logc                    |v rj                  d|       y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excluderA   r   s     r   pfz!install_lib.copy_tree.<locals>.pfx   sK    g~JCPHH'bggooc.BCOOC Jr   )rG   strrH   rK   )r#   origr
   	copy_treesetuptools.archive_utilr@   	distutilsrA   )r   infileoutfilepreserve_modepreserve_timespreserve_symlinkslevelr@   rJ   rI   rA   r   s            @@@r   rM   zinstall_lib.copy_tree^   sh     $$%%'##--dFGDD 	=! 	 	"-r   c                    t         j                  j                  |       }| j                         }|r|D cg c]	  }||vs| c}S |S c c}w r   )rL   r
   get_outputsr#   )r   outputsrI   fs       r   rW   zinstall_lib.get_outputs   sK    ""..t4%%'&;!!7*:A;; <s   	A	 A	N)returnNone)TTF   )rP   r   rQ   rK   rR   boolrS   r]   rT   r]   rU   objectrZ   z	list[str])__name__
__module____qualname____doc____annotations__r   r#   r    staticmethodr   r   r   rM   rW    r   r   r
   r
      s    C(@6 > >D  " "2 ##"'$$ $
 $ $  $ $ 
$Lr   r
   )
__future__r   r'   r<   	itertoolsr   r   _pathr   distr   distutils.command.install_libcommandr
   rL   re   r   r   <module>rl      s1    " 	 
 &   , ,|$"" |r   