+
     ha  c                  s    R t ^ RIH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IHt ^R	IHt  ! R
 R]4      tR# )zdistutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.)annotationsN)Callable)log)ClassVar)new_compilershow_compilers)Command)DistutilsSetupError)customize_compilerc                  s    ] tR t^t$ Rt. ROtR]R&   RR.tR]R&   RR	R
]3.t	R]R&   R t
R R ltR R ltR R ltR tR tR R ltRtR	# )
build_clibz/build C/C++ libraries used by Python extensionsdebugforcez$ClassVar[list[tuple[str, str, str]]]user_optionszClassVar[list[str]]boolean_optionszhelp-compilerNzlist available compilerszAClassVar[list[tuple[str, str | None, str, Callable[[], object]]]]help_optionsc                	s    R V n         R V n        R V n        R V n        R V n        R V n        R V n        RV n        R V n        R # )NF)	r	   
build_temp	librariesinclude_dirsdefineundefr
   r   compilerself   &M/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_clib.pyinitialize_optionsZbuild_clib.initialize_options-   sF      !


    c                   V ^8  d   QhRR/# i   ZreturnZNone Zformat   "r   __annotate__build_clib.__annotate__<   s     D D$ Dr   c                	s   V P                  R RRRRR4       V P                  P                  V n        V P                  '       d   V P                  V P                  4       V P                  f&   V P                  P                  ;'       g    . V n        \        V P                  \        4      '       d1   V P                  P                  \        P                  4      V n        R# R# )ZbuildN)r   r	   )r   r   )r   r   )r
   r
   )r   r   )
Zset_undefined_optionsZdistributionr   check_library_listr   
isinstancestrZsplitosZpathsepr   r   r   finalize_optionsZbuild_clib.finalize_options<   s     	""(($	
 **44>>>##DNN3$ $ 1 1 > > D D"Dd''-- $ 1 1 7 7

 CD .r   c               r   r   r   r   r   r   r    r!   W   s     - -T -r   c                	sJ   V P                   '       g   R # \        V P                  V P                  V P                  R7      V n        \        V P                  4       V P                  e&   V P                  P                  V P                  4       V P                  e1   V P                   F   w  rV P                  P                  W4       K"  	  V P                  e/   V P                   F  pV P                  P                  V4       K   	  V P                  V P                   4       R # )N)r   dry_runr   )r   r   r   r'   r   r   r   Zset_include_dirsr   Zdefine_macror   Zundefine_macrobuild_libraries)r   nameZvalueZmacro   &   r   runZbuild_clib.runW   s    ~~~$]]DLL


 	4==)(MM**4+<+<=;;"#{{**47  +::!,,U3 $ 	T^^,r   c               r   r   r   r   r   r   r    r!   l   s     " "t "r   c                s   \        V\        4      '       g   \        R4      hV F  p\        V\        4      '       g   \	        V4      ^8w  d   \        R4      hVw  r4\        V\
        4      '       g   \        R4      hRV9   g+   \        P                  R8w  d,   \        P                  V9   d   \        RV^ ,           R24      h\        V\        4      '       d   K  \        R4      h	  R# )	a0  Ensure that the list of libraries is valid.

`library` is presumably provided as a command option 'libraries'.
This method checks that it is a list of 2-tuples, where the tuples
are (library_name, build_info_dict).

Raise DistutilsSetupError if the structure is invalid anywhere;
just returns otherwise.
z+'libraries' option must be a list of tuplesz*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)Z/zbad library name 'z'': may not contain directory separatorszMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r#   listr   tupleZlenr$   r%   ZsepZdict)r   r   Zlibr)   
build_infos   &&   r   r"   Zbuild_clib.check_library_listl   s     )T**%&STTCc5))c#h!m)*VWW"DdC((): 
 d{rvv}4)(Q0WX  j$//)8 % r   c                	s~    V P                   '       g   R # . pV P                    F  w  r#VP                  V4       K  	  V# )N)r   Zappend)r   Z	lib_nameslib_nameZ_build_infor*   r   get_library_namesZbuild_clib.get_library_names   s:     ~~~	%)^^!HX& &4r   c                	s   V P                  V P                  4       . pV P                   FV  w  r#VP                  R 4      pVe   \        V\        \
        34      '       g   \        RV R24      hVP                  V4       KX  	  V# )sources in 'libraries' option (library 'D'), 'sources' must be present and must be a list of source filenames)r"   r   getr#   r,   r-   r   Zextend)r   Z	filenamesr/   r.   r1   s   &    r   get_source_filesZbuild_clib.get_source_files   s    /	$(NN H nnY/Gj4-&H&H)6xj A1 1  W% %3 r   c               r   r   r   r   r   r   r    r!      s      D r   c           	     	s   V F  w  r#VP                  R 4      pVe   \        V\        \        34      '       g   \	        RV R24      h\        V4      p\
        P                  ! RV4       VP                  R4      pVP                  R4      pV P                  P                  VV P                  VVV P                  R7      pV P                  P                  WrV P                  V P                  R7       K  	  R# )	r1   Nr2   r3   zbuilding '%s' librarymacrosr   )
output_dirr6   r   r
   )r7   r
   )r4   r#   r,   r-   r   r   Zinfor   Zcompiler   r
   Zcreate_static_libr	   )r   r   r/   r.   r1   r6   r   Zobjectss   &&      r   r(   Zbuild_clib.build_libraries   s    $- H nnY/Gj4-&H&H)6xj A1 1 
 7mGHH,h7
  ^^H-F%>>.9Lmm++??)jj , G MM++dooTZZ , 9 %.r   )	r	   r   r   r
   r   r   r   r   r   ))zbuild-clib=Zbz%directory to build C/C++ libraries to)zbuild-temp=Ztz,directory to put temporary build by-products)r
   Zgz"compile with debugging information)r   Zfz2forcibly build everything (ignore file timestamps))z	compiler=Zczspecify the compiler type)Z__name__Z
__module__Z__qualname__Z__firstlineno__Zdescriptionr   Z__annotations__r   r   r   r   r&   r+   r"   r0   r5   r(   Z__static_attributes__r   r   r   r	   r	      sq    CK:L6  -4W+=O(= 
$ :NKWLS D6-*"H	 r   r	   )Z__doc__Z
__future__r    r%   Zcollections.abcr   Zdistutils._logr   Ztypingr   Z	ccompilerr   r   Zcorer   Zerrorsr   Z	sysconfigr   r	   r   r   r   <module>r8      s5    # 	 $   4  ( *m mr   