+
     h<  c                  s   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^RIHtHt ^R	IHt ^R
IHt ^ RIHu Ht ^ RIt^ RIHt Rt R R lt! ! R R]P4                  4      tR t" ! R R4      t#R# )    )annotationsN)IterableIterator)partial)glob)Path)unique_everseen)StrPathStrPathT)Distribution)SetuptoolsDeprecationWarning)convert_pathc                   V ^8  d   QhRR/#    returnZNone Zformat   "@/usr/lib/python3.14/site-packages/setuptools/command/build_py.py__annotate__r      s     > >T >    c                s    \         P                  ! V \         P                  ! V 4      P                  \        P                  ,          4       R # N)osZchmodstatZst_modeZS_IWRITE)target   &r   make_writabler      s'    HHVRWWV_,,t}}<=r   c                  s*  a  ] tR t^t$ RtR]R&   RtR]R&   RtR]R	&   R
 tR+R V 3R lllt	R R lt
R R ltR tR tR tR tR,R V 3R llltR R ltR R ltR R ltR R ltR R  ltR! R" ltR# R$ ltR% tR& tR' tR( t]R-R) l4       tR*tV ;t# ).build_pyaD  Enhanced 'build_py' command that includes data files with packages

The data files are specified via a 'package_data' argument to 'setup()'.
See 'setuptools.dist.Distribution' for more details.

Also, this version of the 'build_py' command allows you to specify both
'py_modules' and 'packages' in the same setup operation.
r
   distributionFbooleditable_modeNzStrPath | Noneexisting_egg_info_dirc                	s   \         P                  P                  V 4       V P                  P                  V n        V P                  P
                  ;'       g    / V n        R V P                  9   d   V P                  R  R# R# )
data_filesN)origr   finalize_optionsr   package_dataexclude_package_data__dict__selfr   r   r$   Zbuild_py.finalize_options,   sa    &&t, --::$($5$5$J$J$P$Pb!4==(l+ )r   c               s4    V ^8  d   QhRRRRRRRRRR	R
RRR/# )r   infiler   outfiler	   preserve_moder   preserve_timeslinkz
str | NonelevelZobjectr   ztuple[StrPathT | str, bool]r   r   r   r   r   build_py.__annotate__3   sP     
 

 
 	

 
 
 
 
%
r   c                	s   < V'       dE   \        \        V4      P                  4       4      p\        \        V4      P                  4       4      p\        SV `  WW4WV4      # r   )strr   Zresolvesuper	copy_file)r)   r*   r+   r,   r-   r.   r/   	__class__s   &&&&&&&r   r3   Zbuild_py.copy_file3   sO     f--/0F$w-//12Gw ]D
 	
r   c               r   r   r   r   r   r   r   r0   D   s     S ST Sr   c                s~   V P                   '       g   V P                  '       d   V P                  '       d   R# V P                   '       d   V P                  4        V P                  '       d!   V P	                  4        V P                  4        V P                  \        P                  P                  V RR7      4       R# )z?Build modules, packages, and copy data files to build directoryNF)include_bytecode)
Z
py_modulespackagesr    Zbuild_modulesZbuild_packagesbuild_package_dataZbyte_compiler#   r   get_outputsr(   r   r   runZbuild_py.runD   s{    4===T5G5G5G??? ===!##% 	$--33D53QRr   c               r   )r   attrr1   r   r   r   r   r   r0   T   s     5 5 5r   c                s    VR8X  d"   V P                  4       V n        V P                  # \        P                  P	                  W4      # )zlazily compute data filesr"   )_get_data_filesr"   r#   r   __getattr__)r)   r:      &&r   r<   Zbuild_py.__getattr__T   s9    <"224DO??"}}((44r   c                s    V P                  4        \        \        V P                  V P                  ;'       g    R4      4      # )z?Generate list of '(package,src_dir,build_dir,filenames)' tuplesr   )analyze_manifestlistmap_get_pkg_data_filesr6   r(   r   r   r;   Zbuild_py._get_data_files[   s2    C00$--2E2E2FGGr   c                s    V P                   P                  R/ 4       \        \        V P                  V P
                  ;'       g    R4      4      # )z
Generate list of ``(package,src_dir,build_dir,filenames)`` tuples,
but without triggering any attempt to analyze or build the manifest.
manifest_filesr   )r'   
setdefaultr?   r@   rA   r6   r(   r   r   get_data_files_without_manifestZ(build_py.get_data_files_without_manifest`   s=     	  !126C00$--2E2E2FGGr   c                	s.   V P                  V4      p\        P                  P                  ! V P                  .VP                  R 4      ,           !  pV P                  W4       Uu. uF"  p\        P                  P                  WB4      NK$  	  ppWW53# u upi ).)get_package_dirr   pathjoin	build_libsplitfind_data_filesZrelpath)r)   packagesrc_dir	build_dirfile	filenamess   &&    r   rA   Zbuild_py._get_pkg_data_filesj   s    &&w/ GGLLDNN#3gmmC6H#HJ	
 ,,W>
> GGOOD*> 	 
 55	
s   $(Bc                s   V P                  V P                  VV\        R7      p\        \	        \
        RR7      V4      p\        P                  P                  V4      p\        \        P                  P                  V4      p\        P                  ! V P                  P                  V. 4      V4      pV P                  WV4      # )z6Return filenames for package's data files in 'src_dir')extra_patternsT)Z	recursive)_get_platform_patternsr%   _IMPLICIT_DATA_FILESr@   r   r   	itertoolschainfrom_iterablefilterr   rG   ZisfilerB   getexclude_data_files)r)   rL   rM   patternsZglobs_expandedZglobs_matchesZ
glob_filesfiless   &&&     r   rK   Zbuild_py.find_data_filesx   s    ../	 / 
 WTT:HE!55nEBGGNNM:
##GR0
 &&w??r   c               s     V ^8  d   QhRRRR/# )r   r5   r   r   z	list[str]r   r   r   r   r   r0      s     5 5D 5I 5r   c                s   < V P                   '       d(   \        V P                  4       P                  4       4      # \        SV `  V4      # )1See :class:`setuptools.commands.build.SubCommand`)r    r?   get_output_mappingZkeysr2   r8   )r)   r5   r4   s   &&r   r8   Zbuild_py.get_outputs   s=    //166899w"#344r   c               r   )r   r   zdict[str, str]r   r   r   r   r   r0      s     9 9N 9r   c                s    \         P                  ! V P                  4       V P                  4       4      p\	        \        VR R7      4      # )r\   c                s    V ^ ,          # )r    r   )Zxr   r   Z<lambda>Z-build_py.get_output_mapping.<locals>.<lambda>   s    !A$r   )Zkey)rT   rU    _get_package_data_output_mapping_get_module_mappingZdictZsorted)r)   Zmappings   & r   r]   Zbuild_py.get_output_mapping   s<    //113$$&
 F7788r   c               r   r   r   zIterator[tuple[str, str]]r   r   r   r   r   r0      s     * *%> *r   c              #  s   "   V P                  4        F8  w  rpVP                  R4      pV P                  V P                  W4      pWC3x  K:  	  R# 5i)z5Iterate over all modules producing (dest, src) pairs.rE   N)Zfind_all_modulesrJ   Zget_module_outfilerI   )r)   rL   ZmoduleZmodule_filefilename   &    r   r_   Zbuild_py._get_module_mapping   sK     ,0,A,A,C(G[mmC(G..t~~wOH)) -Ds   AAc               r   r`   r   r   r   r   r   r0      s     ( (2K (r   c              #  s   "   V P                    FR  w  rr4V FF  p\        P                  P                  W54      p\        P                  P                  W%4      pWg3x  KH  	  KT  	  R# 5i)z6Iterate over package data producing (dest, src) pairs.N)r"   r   rG   rH   )r)   rL   rM   rN   rP   ra   r   srcfiles   &       r   r^   Z)build_py._get_package_data_output_mapping   sP     6:oo2Gi%i:'',,w9'' & 7Fs   A%A'c               r   r   r   r   r   r   r   r0      s     " "D "r   c                s    V P                  4        FQ  w  rV P                  \        P                  P	                  V4      4       V P                  W!4      w  r4\        V4       KS  	  R# )z$Copy data files into build directoryN)r^   Zmkpathr   rG   Zdirnamer3   r   )r)   r   rc   Z_outfZ_copiedrb   r   r7   Zbuild_py.build_package_data   sI    #DDFOFKK/0!^^G<NE&!  Gr   c               r   r   r   r   r   r   r   r0      s     'M 'M$ 'Mr   c                	s   / V n         V P                  P                  '       g   R # / pV P                  ;'       g    R F  pW!\	        V P                  V4      4      &   K!  	  V P                  '       dd   \        V P                  R4      P                  4       '       d:   V P                  p\        VR4      pVP                  RR7      P                  4       pMDV P                  R4       V P                  R4      pVP                  pVP                  P                  p\!        4       pV P#                  WS4       EF  p\$        P&                  P)                  \	        V4      4      w  rR pT
pV	'       dQ   W8w  dK   W9  dE   T	p\$        P&                  P)                  V	4      w  r\$        P&                  P+                  W4      p
KX  W9   g   K  W8X  d   VP-                  V
4      '       d   K  M1VP/                  W,          V
4      pV'       d   VP1                  V4       V P                   P3                  W,          . 4      P5                  V4       EK  	  R # )NzSOURCES.txtzutf-8)Zencodingegg_infor   )rB   r   Zinclude_package_datar6   assert_relativerF   r!   r   ZexistsZ	read_textZ
splitlinesZrun_commandget_finalized_commandrd   Zfilelistr[   _IncludePackageDataAbuse_filter_build_filesr   rG   rJ   rH   	is_moduleimportable_subpackagewarnrC   Zappend)r)   Zsrc_dirsrL   Zegg_info_dirZmanifestr[   Zei_cmdZcheckrG   dfZprevZoldfZdf
importables   &              r   r>   Zbuild_py.analyze_manifest   s   46  555#%}}***GGN_T%9%9'%BCD +
 &&&T//?FFHH55LL-8H&&&8CCEEZ(//
;F!??LOO))E(*,,UAD77==!67DADD	a&7a(GGLL'}9q))  * "'!<!<X[!!LJ!

:.##..x{B?FFtL! Br   c               s$    V ^8  d   QhRRRRRR/# )r   r[   zIterable[str]rd   r   r   zIterator[str]r   r   r   r   r   r0      s$      ".5	r   c              #  s  a"   V P                  R4      pW P                  VP                  VP                  3pV Uu. uF+  qU'       g   K  \        P
                  P                  V4      NK-  	  ppV F  p\        P
                  P                  V4      o\        P
                  P                  V4      '       dC   \        ;QJ d    V3R lV 4       F  '       d   K   RM	  RM! V3R lV 4       4      '       g   K  Vx  K  	  R# u upi 5i)aM  
``build_meta`` may try to create egg_info outside of the project directory,
and this can be problematic for certain plugins (reported in issue #3500).

Extensions might also include between their sources files created on the
``build_lib`` and ``build_temp`` directories.

This function should filter this case of invalid files out.
buildc              3  s,   <"   T F	  qS9  x  K  	  R # 5ir   r   ).0rl   	norm_path   & r   	<genexpr>Z/build_py._filter_build_files.<locals>.<genexpr>   s     -T)Qy.@)s   FTN)	rf   rI   Z
build_tempZ
build_baser   rG   ZnormpathisabsZall)	r)   r[   rd   ro   Z
build_dirsZpZ	norm_dirsrO   rq   s	   &&&     @r   rh   Zbuild_py._filter_build_files   s      **730@0@%BRBRS
2<B*Q(RWW%%a(*	BD((.I77==&&##-T)-T###-T)-T*T*T
  Cs)   9D		D
#D-AD	D	D	:D	c               r   r   r   r   r   r   r   r0      s       r   c                	s    R # r   r   r(   r   r   get_data_filesZbuild_py.get_data_files   s    r   c                sX    V P                   V,          #   \         d     Mi ; i\        P                  P	                  YT4      pY0P                   T&   T'       d   T P
                  P                  '       g   T# T P
                  P                   F)  pYA8X  g!   TP                  TR,           4      '       g   K)   M	  T# \        TR4      ;_uu_ 4       pTP                  4       pRRR4       M  + '       g   i     M; iRX9  d$   \        P                  P                  RT R24      hT# )z8Check namespace packages' __init__ for declare_namespacerE   ZrbNs   declare_namespacezNamespace package problem: z is a namespace package, but its
__init__.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)
")packages_checkedZKeyErrorr#   r   check_packager   Znamespace_packagesZ
startswithZopenZread	distutilsZerrorsZDistutilsError)r)   rL   Zpackage_dirZinit_pypkgrm   Zcontentss   &&&    r   rw   Zbuild_py.check_package   s   	((11 		 ----d[I)0g&d//BBBN$$77C~#!>!> 8 N'4  AvvxH !   x/""11-gY 78 8  s    ##C--C=	c                	sn    / V n         \        P                  P                  V 4       R V n        RV n        R# )FN)rv   r#   r   initialize_optionsr    r!   r(   r   r   rz   Zbuild_py.initialize_options  s,     "((."%)"r   c                	s    \         P                  P                  W4      pV P                  P                  e5   \
        P                  P                  V P                  P                  V4      # V# r   )r#   r   rF   r   Zsrc_rootr   rG   rH   )r)   rL   Zress   && r   rF   Zbuild_py.get_package_dir  sN    mm++D:%%177<< 1 1 : :C@@
r   c                s  aa \        S4      oV P                  V P                  VV4      pV3R lV 4       p\        P                  P                  V4      p\        V4      oV3R lS 4       p\        \        V4      4      # )z6Filter filenames for package's data files in 'src_dir'c              3  sR   <"   T F  p\         P                  ! SV4      x  K  	  R # 5ir   )fnmatchrW   )rp   patternr[   rr   r   rs   .build_py.exclude_data_files.<locals>.<genexpr>!  s     Oh7ug66hs   $'c              3  s8   <"   T F  qS9  g   K  Vx  K  	  R # 5ir   r   )rp   Zfnbadrr   r   rs   r}   %  s     7"322s   
)r?   rR   r&   rT   rU   rV   setr   )	r)   rL   rM   r[   rZ   Zmatch_groupsZmatchesZkeepersr~   s	   &&&f    @r   rY   Zbuild_py.exclude_data_files  so    U..%%

 PhO////='l77OG,--r   c                s   a \         P                  ! VV P                  R. 4      V P                  V. 4      4      pV3R lV 4       # )z
yield platform-specific path patterns (suitable for glob
or fn_match) from a glob-based spec (such as
self.package_data or self.exclude_package_data)
matching package in src_dir.
Z c              3  sv   <"   T F.  p\         P                  P                  S\        V4      4      x  K0  	  R # 5ir   )r   rG   rH   r   )rp   r|   rM   rr   r   rs   Z2build_py._get_platform_patterns.<locals>.<genexpr>6  s1      
 ( GGLL,w"788's   69)rT   rU   rX   )ZspecrL   rM   rQ   Zraw_patternss   &&f& r   rR   Zbuild_py._get_platform_patterns)  sF     !HHRHHWb!


 (
 	
r   )r"   r    r&   r!   rB   r%   rv   )TTNi   )T)r   ) __name__
__module____qualname____firstlineno____doc__Z__annotations__r    r!   r$   r3   r9   r<   r;   rD   rA   rK   r8   r]   r_   r^   r7   r>   rh   ru   rw   rz   rF   rY   ZstaticmethodrR   __static_attributes__Z__classcell__)r4   s   @r   r   r      s     M4,0>0,
 
"S 5H
H6@$5 59*("'MR*<*.  
 
r   r   c                s    \         P                  P                  V 4      '       g   V # ^ RIHp \
        P                  ! R4      P                  4       V ,          pV! V4      h)r    )DistutilsSetupErrorz
        Error: setup script specifies an absolute path:

            %s

        setup() arguments must *always* be /-separated paths relative to the
        setup.py directory, *never* absolute paths.
        )r   rG   rt   distutils.errorsr   textwrapZdedentZlstrip)rG   r   Zmsgs   &  r   re   re   =  sS    77==4 			
 &(

	  c
""r   c                  sH    ] tR tRtRt ! R R]4      tR tR tR t	R t
R	tR
# )rg   iR  z>Inform users that package or module is included as 'data file'c                  s    ] tR tRtRtRtRtR# )!_IncludePackageDataAbuse._WarningiU  zU
        Package {importable!r} is absent from the `packages` configuration.
        a|  
        ############################
        # Package would be ignored #
        ############################
        Python recognizes {importable!r} as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that {importable!r} is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want {importable!r} to be distributed and are
        already explicitly excluding {importable!r} via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        r   N)r   r   r   r   Z_SUMMARYZ_DETAILSr   r   r   r   _Warningr   U  s    "r   r   c                	s$    \        4       V n        R # r   )r   _already_warnedr(   r   r   __init__Z!_IncludePackageDataAbuse.__init__  s    "ur   c                	sn    VP                  R 4      ;'       d    VR\        R 4      )  P                  4       # )z.pyN)ZendswithZlenisidentifier)r)   rO   r=   r   ri   Z"_IncludePackageDataAbuse.is_module  s/    }}U#JJ]E
{(;(H(H(JJr   c                	s    \        V4      P                  p\        \        P                  ! \
        P                  VP                  4      4      pV'       d   R P                  V.VO4      # R# )rE   N)	r   parentr?   rT   Z	takewhiler1   r   partsrH   )r)   r   rO   ry   r   s   &&&  r   rj   Z._IncludePackageDataAbuse.importable_subpackage  sO    4jY(()9)9399EF88V,e,--r   c                	s    WP                   9  d:   V P                  P                  VR 7       V P                   P                  V4       R# R# ))rn   N)r   r   ZemitZadd)r)   rn   r=   r   rk   Z_IncludePackageDataAbuse.warn  s<    111MM*5  $$Z0 2r   )r   N)r   r   r   r   r   r   r   r   ri   rj   rk   r   r   r   r   rg   rg   R  s(    H'/ 'V%K1r   rg   )z*.pyizpy.typed)$Z
__future__r   r{   rT   r   r   r   Zcollections.abcr   r   Z	functoolsr   r   Zpathlibr   Zmore_itertoolsr   Z_pathr   r	   Zdistr
   Zwarningsr   Zdistutils.command.build_pyZcommandr   r#   r   rx   Zdistutils.utilr   rS   r   re   rg   r   r   r   <module>r      sh    "   	   .    * %  3 ) )  ', >\
t}} \
~#*>1 >1r   