Ë
    nûàg/  ã                   óh   — d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ d	„ Z G d
„ de«      Zy)z´distutils.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.é    N)Úlog)ÚClassVaré   )ÚCommand)ÚDistutilsSetupError)Úcustomize_compilerc                  ó   — ddl m}   | «        y )Nr   ©Úshow_compilers)Ú	ccompilerr   r
   s    úf/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/setuptools/_distutils/command/build_clib.pyr   r      s   € Ý*áÕó    c                   ó|   — e Zd ZU dZg d¢Zeeeeeef         e	d<   ddgZ
dddefgZd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú
build_clibz/build C/C++ libraries used by Python extensions))zbuild-clib=Úbz%directory to build C/C++ libraries to)zbuild-temp=Útz,directory to put temporary build by-products)ÚdebugÚgz"compile with debugging information)ÚforceÚfz2forcibly build everything (ignore file timestamps))z	compiler=Úczspecify the compiler typeÚuser_optionsr   r   zhelp-compilerNzlist available compilersc                 ó‚   — d | _         d | _        d | _        d | _        d | _        d | _        d | _        d| _        d | _        y )NF)	r   Ú
build_tempÚ	librariesÚinclude_dirsÚdefineÚundefr   r   Úcompiler©Úselfs    r   Úinitialize_optionszbuild_clib.initialize_options1   sF   € ØˆŒØˆŒð ˆŒð !ˆÔØˆŒØˆŒ
ØˆŒ
ØˆŒ
Øˆ�r   c                 óœ  — | j                  dddddd«       | j                  j                  | _        | j                  r| j                  | j                  «       | j                  €| j                  j                  xs g | _        t        | j                  t        «      r/| j                  j                  t        j                  «      | _        y y )NÚbuild)r   r   )r   r   )r   r   )r   r   )r   r   )
Úset_undefined_optionsÚdistributionr   Úcheck_library_listr   Ú
isinstanceÚstrÚsplitÚosÚpathsepr    s    r   Úfinalize_optionszbuild_clib.finalize_options@   s©   € ð 	×"Ñ"ØØ(Ø(Ø$ØØô	
ð ×*Ñ*×4Ñ4ˆŒØ�>Š>Ø×#Ñ# D§N¡NÔ3à×ÑÐ$Ø $× 1Ñ 1× >Ñ >Ò DÀ"ˆDÔÜ�d×'Ñ'¬Ô-Ø $× 1Ñ 1× 7Ñ 7¼¿
¹
Ó CˆDÕð .r   c                 ó0  — | j                   sy ddlm}  || j                  | j                  | j
                  ¬«      | _        t        | j                  «       | j                  �%| j                  j                  | j                  «       | j                  �0| j                  D ]!  \  }}| j                  j                  ||«       Œ# | j                  �,| j                  D ]  }| j                  j                  |«       Œ | j                  | j                   «       y )Nr   )Únew_compiler)r   Údry_runr   )r   r   r/   r   r0   r   r   r   Úset_include_dirsr   Údefine_macror   Úundefine_macroÚbuild_libraries)r!   r/   ÚnameÚvalueÚmacros        r   Úrunzbuild_clib.run[   sÚ   € Ø�~Š~Øõ 	-á$Ø—]‘]¨D¯L©LÀÇ
Á
ô
ˆŒô 	˜4Ÿ=™=Ô)à×ÑÐ(Ø�M‰M×*Ñ*¨4×+<Ñ+<Ô=Ø�;‰;Ð"à#Ÿ{™{ò 8‘��eØ—‘×*Ñ*¨4°Õ7ð8à�:‰:Ð!ØŸ™ò 4�Ø—‘×,Ñ,¨UÕ3ð4ð 	×Ñ˜TŸ^™^Õ,r   c                 ó†  — t        |t        «      st        d«      ‚|D ]¡  }t        |t        «      st	        |«      dk7  rt        d«      ‚|\  }}t        |t
        «      st        d«      ‚d|v s%t        j                  dk7  r$t        j                  |v rt        d|d   › d�«      ‚t        |t        «      rŒ˜t        d	«      ‚ y
)a`  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 tuplesr   z*each element of 'libraries' must a 2-tuplezNfirst element of each tuple in 'libraries' must be a string (the library name)ú/zbad library name 'r   z'': may not contain directory separatorszMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r(   Úlistr   ÚtupleÚlenr)   r+   ÚsepÚdict)r!   r   Úlibr5   Ú
build_infos        r   r'   zbuild_clib.check_library_lists   sÈ   € ô ˜)¤TÔ*Ü%Ð&SÓTÐTàò 	ˆCÜ˜c¤5Ô)¬c°#«h¸!ªmÜ)Ð*VÓWÐWà"ÑˆD�*ä˜d¤CÔ(Ü)ð:óð ð
 �d‰{œrŸv™v¨š}´·±¸4±Ü)Ø(¨¨Q©¨Ð0WÐXóð ô ˜j¬$Õ/Ü)ð8óð ñ%	r   c                 ón   — | j                   sy g }| j                   D ]  \  }}|j                  |«       Œ |S )N)r   Úappend)r!   Ú	lib_namesÚlib_nameÚ_build_infos       r   Úget_library_nameszbuild_clib.get_library_names—   s?   € ð �~Š~Øàˆ	Ø%)§^¡^ò 	'Ñ!ˆH�kØ×Ñ˜XÕ&ð	'àÐr   c                 óú   — | j                  | j                  «       g }| j                  D ]N  \  }}|j                  d«      }|�t        |t        t
        f«      st        d|› d�«      ‚|j                  |«       ŒP |S )NÚsourcesú in 'libraries' option (library 'úD'), 'sources' must be present and must be a list of source filenames)r'   r   Úgetr(   r;   r<   r   Úextend)r!   Ú	filenamesrE   rA   rI   s        r   Úget_source_fileszbuild_clib.get_source_files¢   sˆ   € Ø×Ñ §¡Ô/Øˆ	Ø$(§N¡Nò 		&Ñ ˆH�jØ —n‘n YÓ/ˆGØˆ¤j°¼4Ä¸-Ô&HÜ)Ø6°x°jð A1ð 1óð ð ×Ñ˜WÕ%ð		&ð Ðr   c                 óÜ  — |D ]ç  \  }}|j                  d«      }|�t        |t        t        f«      st	        d|› d�«      ‚t        |«      }t        j                  d|«       |j                  d«      }|j                  d«      }| j                  j                  || j                  ||| j                  ¬«      }| j                  j                  ||| j                  | j                  ¬«       Œé y )	NrI   rJ   rK   zbuilding '%s' libraryÚmacrosr   )Ú
output_dirrQ   r   r   )rR   r   )rL   r(   r;   r<   r   r   Úinfor   Úcompiler   r   Úcreate_static_libr   )r!   r   rE   rA   rI   rQ   r   Úobjectss           r   r4   zbuild_clib.build_libraries±   sç   € Ø$-ò 	Ñ ˆH�jØ —n‘n YÓ/ˆGØˆ¤j°¼4Ä¸-Ô&HÜ)Ø6°x°jð A1ð 1óð ô
 ˜7“mˆGä�H‰HÐ,¨hÔ7ð
  —^‘^ HÓ-ˆFØ%Ÿ>™>¨.Ó9ˆLØ—m‘m×+Ñ+ØØŸ?™?ØØ)Ø—j‘jð ,ó ˆGð �M‰M×+Ñ+Ø˜¨d¯o©oÀTÇZÁZð ,õ ñ9	r   )Ú__name__Ú
__module__Ú__qualname__Údescriptionr   r   r;   r<   r)   Ú__annotations__Úboolean_optionsr   Úhelp_optionsr"   r-   r8   r'   rG   rO   r4   © r   r   r   r       sq   … ØC€Kò:€L�(˜4  c¨3° mÑ 4Ñ5Ñ6ó ð  Ð(€Oð 
˜$Ð :¸NÐKð€LòòDò6-ò0"òH	òór   r   )Ú__doc__r+   Údistutils._logr   Útypingr   Úcorer   Úerrorsr   Ú	sysconfigr   r   r   r^   r   r   ú<module>re      s1   ðñó  
Ý Ý å Ý (Ý *òôp�õ pr   