§
    Ÿj  ã                   ód   — 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„ Z
 G d	„ d
e¦  «        ZdS )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é   )ÚCommand)ÚDistutilsSetupError)Úcustomize_compiler)Úlogc                  ó&   — ddl m}   | ¦   «          d S )Nr   ©Úshow_compilers)Ú	ccompilerr
   r	   s    úu/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/setuptools/_distutils/command/build_clib.pyr
   r
      s(   € Ø*Ð*Ð*Ð*Ð*Ð*à€NÑÔÐÐÐó    c                   óZ   — e Zd ZdZg d¢Z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dS )Ú
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 typer   r   zhelp-compilerNzlist available compilersc                 ó„   — d | _         d | _        d | _        d | _        d | _        d | _        d | _        d| _        d | _        d S )Nr   )	r   Ú
build_tempÚ	librariesÚinclude_dirsÚdefineÚundefr   r   Úcompiler©Úselfs    r   Úinitialize_optionszbuild_clib.initialize_options0   sJ   € ØˆŒØˆŒð ˆŒð !ˆÔØˆŒØˆŒ
ØˆŒ
ØˆŒ
ØˆŒˆˆr   c                 ó\  — |                       dddddd¦  «         | j        j        | _        | j        r|                      | j        ¦  «         | j        €| j        j        pg | _        t          | j        t          ¦  «        r+| j                             t          j	        ¦  «        | _        d S d S )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Ñ3Ô3Ð3àÔÐ$Ø $Ô 1Ô >Ð DÀ"ˆDÔÝ�dÔ'­Ñ-Ô-ð 	DØ $Ô 1× 7Ò 7½¼
Ñ CÔ CˆDÔÐÐð	Dð 	Dr   c                 óÄ  — | j         sd S ddlm}  || j        | j        | j        ¬¦  «        | _        t          | j        ¦  «         | j        �| j                             | j        ¦  «         | j	        �(| j	        D ] \  }}| j         
                    ||¦  «         Œ!| j        �$| j        D ]}| j                             |¦  «         Œ|                      | j         ¦  «         d S )Nr   )Únew_compiler)r   Údry_runr   )r   r   r-   r   r.   r   r   r   Úset_include_dirsr   Údefine_macror   Úundefine_macroÚbuild_libraries)r   r-   ÚnameÚvalueÚmacros        r   Úrunzbuild_clib.runZ   s  € ØŒ~ð 	ØˆFð 	-Ð,Ð,Ð,Ð,Ð,à$˜Ø”]¨D¬LÀÄ
ð
ñ 
ô 
ˆŒõ 	˜4œ=Ñ)Ô)Ð)àÔÐ(ØŒM×*Ò*¨4Ô+<Ñ=Ô=Ð=ØŒ;Ð"à!%¤ð 8ð 8‘��uØ”×*Ò*¨4°Ñ7Ô7Ð7Ð7ØŒ:Ð!Øœð 4ð 4�Ø”×,Ò,¨UÑ3Ô3Ð3Ð3à×Ò˜Tœ^Ñ,Ô,Ð,Ð,Ð,r   c                 óÔ  — t          |t          ¦  «        st          d¦  «        ‚|D ]À}t          |t          ¦  «        s"t	          |¦  «        dk    rt          d¦  «        ‚|\  }}t          |t
          ¦  «        st          d¦  «        ‚d|v st          j        dk    r&t          j        |v rt          d|d         z  ¦  «        ‚t          |t          ¦  «        st          d¦  «        ‚ŒÁd	S )
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 '%s': may not contain directory separatorsr   zMsecond element of each tuple in 'libraries' must be a dictionary (build info)N)	r&   Úlistr   ÚtupleÚlenr'   r)   ÚsepÚdict)r   r   Úlibr3   Ú
build_infos        r   r%   zbuild_clib.check_library_listr   s  € õ ˜)¥TÑ*Ô*ð 	UÝ%Ð&SÑTÔTÐTàð 	ð 	ˆCÝ˜c¥5Ñ)Ô)ð X­c°#©h¬h¸!ªm¨mÝ)Ð*VÑWÔWÐWà"ÑˆD�*å˜d¥CÑ(Ô(ð Ý)ð:ñô ð ð
 �dˆ{ˆ{�rœv¨š}˜}µ´¸4°°Ý)ð;Ø=@À¼VñDñô ð õ
 ˜j­$Ñ/Ô/ð Ý)ð8ñô ð ðð%	ð 	r   c                 ó`   — | j         sd S g }| j         D ]\  }}|                     |¦  «         Œ|S )N)r   Úappend)r   Ú	lib_namesÚlib_namer?   s       r   Úget_library_nameszbuild_clib.get_library_names—   sK   € ð Œ~ð 	Ø�4àˆ	Ø&*¤nð 	'ð 	'Ñ"ˆX�zØ×Ò˜XÑ&Ô&Ð&Ð&ØÐr   c                 ó  — |                       | j        ¦  «         g }| j        D ]_\  }}|                     d¦  «        }|�t          |t          t
          f¦  «        st          d|z  ¦  «        ‚|                     |¦  «         Œ`|S )NÚsourcesúfin 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames)r%   r   Úgetr&   r9   r:   r   Úextend)r   Ú	filenamesrC   r?   rF   s        r   Úget_source_fileszbuild_clib.get_source_files¢   s™   € Ø×Ò ¤Ñ/Ô/Ð/Øˆ	Ø&*¤nð 		&ð 		&Ñ"ˆX�zØ —n’n YÑ/Ô/ˆGØˆ¥j°½4Å¸-Ñ&HÔ&HˆÝ)ð1à3;ñ<ñô ð ð ×Ò˜WÑ%Ô%Ð%Ð%ØÐr   c                 óÞ  — |D ]é\  }}|                      d¦  «        }|�t          |t          t          f¦  «        st	          d|z  ¦  «        ‚t          |¦  «        }t          j        d|¦  «         |                      d¦  «        }|                      d¦  «        }| j                             || j	        ||| j
        ¬¦  «        }| j                             ||| j        | j
        ¬¦  «         Œêd S )NrF   rG   zbuilding '%s' libraryÚmacrosr   )Ú
output_dirrM   r   r   )rN   r   )rH   r&   r9   r:   r   r   Úinfor   Úcompiler   r   Úcreate_static_libr   )r   r   rC   r?   rF   rM   r   Úobjectss           r   r2   zbuild_clib.build_libraries±   s  € Ø&/ð 	ð 	Ñ"ˆX�zØ —n’n YÑ/Ô/ˆGØˆ¥j°½4Å¸-Ñ&HÔ&HˆÝ)ð1à3;ñ<ñô ð õ
 ˜7‘m”mˆGåŒHÐ,¨hÑ7Ô7Ð7ð
  —^’^ HÑ-Ô-ˆFØ%Ÿ>š>¨.Ñ9Ô9ˆLØ”m×+Ò+ØØœ?ØØ)Ø”jð ,ñ ô ˆGð ŒM×+Ò+Ø˜¨d¬oÀTÄZð ,ñ ô ð ð ð9	ð 	r   )Ú__name__Ú
__module__Ú__qualname__ÚdescriptionÚuser_optionsÚboolean_optionsr
   Úhelp_optionsr    r+   r6   r%   rD   rK   r2   © r   r   r   r      s¹   € € € € € àC€Kðð ð €Lð  Ð(€Oð 
˜$Ð :¸NÐKð€Lðð ð ðDð Dð Dð6-ð -ð -ð0#ð #ð #ðJ	ð 	ð 	ðð ð ðð ð ð ð r   r   )Ú__doc__r)   Úcorer   Úerrorsr   Ú	sysconfigr   Údistutils._logr   r
   r   rZ   r   r   ú<module>r`      s¯   ððð ð  
€	€	€	Ø Ð Ð Ð Ð Ð Ø (Ð (Ð (Ð (Ð (Ð (Ø *Ð *Ð *Ð *Ð *Ð *Ø Ð Ð Ð Ð Ð ðð ð ðrð rð rð rð r�ñ rô rð rð rð rr   