+
    SBi8A                         R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^RI
Ht ^RIHtHt ^RIHt  ! R R]4      tR# )	zHdistutils.command.build_py

Implements the Distutils 'build_py' command.N)log)ClassVar)Command)DistutilsFileErrorDistutilsOptionError)convert_pathc                     a  ] tR t^t o Rt. R"OtRR.tRR/tR tV 3R lR lt	V 3R	 lR
 lt
R tR tV 3R lR ltR tR tR tR tR tR tR tR tR#V 3R lR lltR tV 3R lR ltV 3R lR ltV 3R lR ltV 3R  ltR!tV tR# )$build_pyz5"build" pure Python modules (copy to build directory)compile
no-compileNforcec                v    R V n         R V n        R V n        R V n        R V n        RV n        ^ V n        R V n        R # )NF)	build_lib
py_modulespackagepackage_datapackage_dirr
   optimizer   selfs   &K/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_py.pyinitialize_optionsbuild_py.initialize_options$   s<     
    c                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "r   __annotate__build_py.__annotate__.   s     J J$ Jr   c                   V P                  R RR4       V P                  P                  V n        V P                  P                  V n        V P                  P                  V n        / V n        V P                  P
                  '       dF   V P                  P
                  P                  4        F  w  r\        V4      V P
                  V&   K  	  V P                  4       V n	        \        V P                  \        4      '       g<    \        V P                  4      V n        ^ V P                  u;8:  d	   ^8:  g   Q h Q hR# R#   \        \        3 d    \        R4      hi ; i)buildzoptimize must be 0, 1, or 2N)r   r   )r   r   )set_undefined_optionsdistributionpackagesr   r   r   itemsr   get_data_files
data_files
isinstancer   int
ValueErrorAssertionErrorr   )r   namepaths   &  r   finalize_optionsbuild_py.finalize_options.   s%   ""/1C	
 ))22++66 --::((("//;;AAC
)5d);  & D--/ $----J #DMM 2DMM.Q..... . / J*+HIIJs   8D? ?Ec                   < V ^8  d   QhRR/# r   r   )r   r    s   "r   r!   r"   G   s     D DT Dr   c                    V P                   '       d   V P                  4        V P                  '       d!   V P                  4        V P	                  4        V P                  V P                  R R7      4       R# )F)include_bytecodeN)r   build_modulesr'   build_packagesbuild_package_databyte_compileget_outputsr   s   &r   runbuild_py.runG   sV    , ??? ===!##%$**E*BCr   c                   . pV P                   '       g   V# V P                    F  pV P                  V4      p\        P                  P                  ! V P
                  .VP                  R4      ,           !  p^ pV'       d   \        V4      ^,           pV P                  W#4       Uu. uF  qfVR NK	  	  ppVP                  W#WG34       K  	  V# u upi )z?Generate list of '(package,src_dir,build_dir,filenames)' tuples.N)
r'   get_package_dirosr0   joinr   splitlenfind_data_filesappend)r   datar   src_dir	build_dirplenfile	filenamess   &       r   r)   build_py.get_data_filese   s    }}}K}}G**73G '7'--:L'LNI D7|a' 261E1Eg1WX1Wde1WIXKK9@A %  Ys   %Cc           	        V P                   P                  R. 4      V P                   P                  V. 4      ,           p. pV F  p\        P                  ! \        P                  P                  \        P                  ! V4      \        V4      4      4      pTP                  V Uu. uF4  qwV9  g   K  \        P                  P                  V4      '       g   K2  VNK6  	  up4       K  	  V# u upi )z6Return filenames for package's data files in 'src_dir' )
r   getglobr@   r0   rA   escaper   extendisfile)r   r   rG   globsfilespatternfilelistfns   &&&     r   rD   build_py.find_data_files{   s    !!%%b"-0A0A0E0Egr0RRGyyT[[1<3HIH LL%%r5RWW^^B=OX   s   %C,
2"C,
C,
c                   < V ^8  d   QhRR/# r   r   )r   r    s   "r   r!   r"      s      D r   c                @   V P                    F  w  rr4V F  p\        P                  P                  W54      pV P	                  \        P                  P                  V4      4       V P                  \        P                  P                  W%4      VRR7       K  	  K  	  R# )z$Copy data files into build directoryFpreserve_modeN)r*   r@   r0   rA   mkpathdirname	copy_file)r   _packagerG   rH   rK   filenametargets   &      r   r8   build_py.build_package_data   sp    7;3Hy%i:BGGOOF34GGLL3V5   & 8Gr   c                `   VP                  R4      pV P                  '       g)   V'       d   \        P                  P                  ! V!  # R# . pV'       dT    V P                  RP	                  V4      ,          pVP                  ^ V4       \        P                  P                  ! V!  # V P                  P                  R4      pVe   VP                  ^ V4       V'       d   \        P                  P                  ! V!  # R#   \         d!    TP                  ^ TR,          4       TR  K  i ; i)zReturn the directory, relative to the top of the source
distribution, where package 'package' should be found
(at least according to the 'package_dir' option, if any).r>   rN   )rB   r   r@   r0   rA   insertKeyErrorrO   )r   r   r0   tailpdirs   &&   r   r?   build_py.get_package_dir   s     }}S!ww||T**D/++CHHTN;D
 KK4(77<<.. ''++B/#KK4(77<<..+   !KK48,R!s   "D 'D-,D-c                   VR 8w  di   \         P                  P                  V4      '       g   \        RV R24      h\         P                  P	                  V4      '       g   \        RV R24      hV'       dH   \         P                  P                  VR4      p\         P                  P                  V4      '       d   V# R# )rN   zpackage directory 'z' does not existzsupposed package directory 'z ' exists, but is not a directoryz__init__.pyN)r@   r0   existsr   isdirrA   rS   )r   r   r   init_pys   &&& r   check_packagebuild_py.check_package   s    
 "77>>+..()+6FG  77==--(2;- @- -  ggll;>Gww~~g&& r   c                    \         P                  P                  V4      '       g   \        P                  ! R W!4       R# R# )z!file %s (for module %s) not foundFT)r@   r0   rS   r   warning)r   modulemodule_files   &&&r   check_modulebuild_py.check_module   s*    ww~~k**KK;[Qr   c                V   V P                  W4       \        P                  ! \        P                  P	                  \        P
                  ! V4      R 4      4      p. p\        P                  P                  V P                  P                  4      pV F  p\        P                  P                  V4      pWu8w  dY   \        P                  P                  \        P                  P                  V4      4      ^ ,          pVP                  WV34       K  V P                  RV 24       K  	  V# )z*.pyz
excluding )rp   rP   r@   r0   rA   rQ   abspathr&   script_namesplitextbasenamerE   debug_print)	r   r   r   module_filesmodulessetup_scriptfabs_frt   s	   &&&      r   find_package_modulesbuild_py.find_package_modules   s    70yydkk+.F!OPwwt'8'8'D'DEAGGOOA&E$))"''*:*:1*=>qA34  :l^!<=  r   c                   / p. pV P                    F  pVP                  R4      pRP                  V^ R 4      pVR,          p W,          w  rxV'       g4   V P                  WW4      p	V^3W&   V	'       d   VP                  VRV	34       \        P                  P                  WvR,           4      p
V P                  W:4      '       g   K  VP                  WVV
34       K  	  V#   \         d    T P	                  T4      pRp Li ; i)a  Finds individually-specified Python modules, ie. those listed by
module name in 'self.py_modules'.  Returns a list of tuples (package,
module_base, filename): 'package' is a tuple of the path through
package-space to the module; 'module_base' is the bare (no
packages, no dots) module name, and 'filename' is the path to the
".py" file (relative to the distribution root) that implements the
module.
r>   F__init__.pyrf   )
r   rB   rA   rh   r?   rp   rE   r@   r0   rv   )r   r'   r   rt   r0   r   module_baser   checkedro   ru   s   &          r   find_modulesbuild_py.find_modules   s       ooF<<$DhhtAbz*Gr(K )1):&
 ,,WB%0!$4!NNGZ#AB
 '',,{%4GHK$$V99NNG+>?1 &4 '   "227; s   
C  D Dc                   . pV P                   '       d    VP                  V P                  4       4       V P                  '       dG   V P                   F6  pV P	                  V4      pV P                  W#4      pVP                  V4       K8  	  V# )a  Compute the list of all modules that will be built, whether
they are specified one-module-at-a-time ('self.py_modules') or
by whole packages ('self.packages').  Return a list of tuples
(package, module, module_file), just like 'find_modules()' and
'find_package_modules()' do.)r   rR   r   r'   r?   r   )r   r   r   r   ms   &    r   find_all_modulesbuild_py.find_all_modules  sq     ???NN4,,./====="227;--gCq! ) r   c                X    V P                  4        Uu. uF  qR,          NK  	  up# u upi )   rf   )r   )r   rt   s   & r   get_source_filesbuild_py.get_source_files/  s)    )-)>)>)@A)@vr

)@AAAs   'c                    V.\        V4      ,           VR ,           .,           p\        P                  P                  ! V!  # )r   )listr@   r0   rA   )r   rH   r   rt   outfile_paths   &&&& r   get_module_outfilebuild_py.get_module_outfile2  s1    !{T']2fun5EEww||\**r   c                6   < V ^8  d   QhRS[ RS[S[,          /# )r   r5   r   )boolr   str)r   r    s   "r   r!   r"   6  s      D DI r   c                   V P                  4       p. pV F  w  rEpVP                  R 4      pV P                  V P                  WE4      pVP	                  V4       V'       g   KN  V P
                  '       d1   VP	                  \        P                  P                  VRR7      4       V P                  ^ 8  g   K  VP	                  \        P                  P                  WpP                  R7      4       K  	  TV P                   UUU	U
Uu. uF.  w  rHrV
 F"  p\        P                  P                  W4      NK$  	  K0  	  upp
p	pp,          pV# u upp
p	ppi )r>   rN   )optimization)r   rB   r   r   rE   r
   	importlibutilcache_from_sourcer   r*   r@   r0   rA   )r   r5   r   outputsr   rt   _module_filerb   rG   rH   rK   s   &&         r   r:   build_py.get_outputs6  s   '')-4)G\mmC(G..t~~wOHNN8$<<<NN!88PR8S ==1$NN!88$== 9  .5  	:>//
:I6)% GGLL-% .:I
 	
 
s   4Ec                ^   \        V\        4      '       d   VP                  R 4      pM'\        V\        \        34      '       g   \        R4      hV P                  V P                  W14      p\        P                  P                  V4      pV P                  V4       V P                  W$RR7      # )r>   z:'package' must be a string (dot-separated), list, or tupleFr\   )r+   r   rB   r   tuple	TypeErrorr   r   r@   r0   r_   r^   r`   )r   rt   ru   r   outfiledirs   &&&&  r   build_modulebuild_py.build_moduleQ  s    gs##mmC(GGdE]33L  ))$..'Jggoog&C~~k%~HHr   c                   < V ^8  d   QhRR/# r   r   )r   r    s   "r   r!   r"   a  s     < <t <r   c                b    V P                  4       pV F  w  r#pV P                  W4V4       K  	  R # N)r   r   )r   r   r   rt   ru   s   &    r   r6   build_py.build_modulesa  s1    ##%,3(G[
 f7; -4r   c                   < V ^8  d   QhRR/# r   r   )r   r    s   "r   r!   r"   j  s     @ @ @r   c                    V P                    FK  pV P                  V4      pV P                  W4      pV F   w  rEpW8X  g   Q hV P                  WVV4       K"  	  KM  	  R # r   )r'   r?   r   r   )r   r   r   r   package_rt   ru   s   &      r   r7   build_py.build_packagesj  s_    }}G ..w7K//EG 29-+***!!&w? 29 %r   c                   < V ^8  d   QhRR/# r   r   )r   r    s   "r   r!   r"   ~  s      T r   c                   \         P                  '       d   V P                  R 4       R# ^RIHp V P
                  pVR,          \        P                  8w  d   V\        P                  ,           pV P                  '       d!   V! V^ V P                  W0P                  R7       V P                  ^ 8  d.   V! VV P                  V P                  VV P                  R7       R# R# )z%byte-compiling is disabled, skipping.N)r9   )r   r   prefixdry_runrf   )sysdont_write_bytecodewarnr   r9   r   r@   sepr
   r   r   r   )r   rU   r9   r   s   &&  r   r9   build_py.byte_compile~  s    """II=>'":bff_F
 <<<FLL ==1jj r   c                x   < V ^8  d   Qh/ S[ S[S[,          ,          ;R&   S[ S[S[S[3,          ,          ;R&   # )r   boolean_optionsnegative_opt)r   r   r   dict)r   r    s   "r   r!   r"      s5       d3i(?! " 4S>*F# r   )
r   r
   r*   r   r   r   r   r   r'   r   ))z
build-lib=dzdirectory to "build" (copy) to)r
   czcompile .py to .pyc)r   Nz!don't compile .py files [default])z	optimize=Ozlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])r   r   z2forcibly build everything (ignore file timestamps))T)__name__
__module____qualname____firstlineno__descriptionuser_optionsr   r   r   r1   r;   r)   rD   r8   r?   rp   rv   r   r   r   r   r   r:   r   r6   r7   r9   __annotate_func____static_attributes____classdictcell__)r    s   @r   r	   r	      s     KKL -6w+?O.:I-FLJ J2D D<, %N42h B+ 6I < <@ @( [  r   r	   )__doc__rP   importlib.utilr   r@   r   distutils._logr   typingr   corer   errorsr   r   r   r   r	   r   r   r   <module>r      s5   0   	 
    = Fw Fr   