Sindbad~EG File Manager
�
�=OgV��^� ddlZddlmZddlTddlmZddlmZd�ZGd�de��Z dS) �N)�Command)�*)�customize_compiler)�logc�&�ddlm}|��dS)Nr��show_compilers)�distutils.ccompilerr rs �5/usr/lib64/python3.11/distutils/command/build_clib.pyr r s(��2�2�2�2�2�2��N������c�Z�eZdZdZgd�ZddgZdddefgZd�Zd �Z d
�Z
d�Zd�Zd
�Z
d�ZdS)�
build_clibz/build C/C++ libraries used by Python extensions))zbuild-clib=�bz%directory to build C/C++ libraries to)zbuild-temp=�tz,directory to put temporary build by-products)�debug�gz"compile with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z compiler=�czspecify the compiler typerrz
help-compilerNzlist available compilersc��d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr) r�
build_temp� libraries�include_dirs�define�undefrr�compiler��selfs r�initialize_optionszbuild_clib.initialize_options4sJ�����������!��������
���
���
���
�
�
rc�\�|�dddddd��|jj|_|jr|�|j��|j�|jjpg|_t|jt��r+|j�tj ��|_dSdS)N�build)rr)rr)rr)rr)rr)
�set_undefined_options�distributionr�check_library_listr�
isinstance�str�split�os�pathseprs r�finalize_optionszbuild_clib.finalize_optionsDs���
�"�"�7�#?�#?�#;�#5�#5� 7� 7� 7��*�4����>� 4��#�#�D�N�3�3�3���$� $� 1� >� D�"�D���d�'��-�-� D� $� 1� 7� 7��
� C� C�D���� D� Drc���|jsdSddlm}||j|j|j���|_t
|j��|j�|j�|j��|j �(|j D] \}}|j�
||���!|j�$|jD]}|j�|���|�
|j��dS)Nr)�new_compiler)r�dry_runr)rr
r,rr-rrr�set_include_dirsr�define_macror�undefine_macro�build_libraries)rr,�name�value�macros r�runzbuild_clib.run^s���~� ��F� 5�4�4�4�4�4�$��d�m�-1�\�+/�:�7�7�7��
� �4�=�)�)�)���(��M�*�*�4�+<�=�=�=��;�"� $��
8�
8���e��
�*�*�4��7�7�7�7��:�!���
4�
4���
�,�,�U�3�3�3�3����T�^�,�,�,�,�,rc��� t|t��std���|D]�}t|t��s"t |��dkrtd���|\}}t|t
��std���d|vstjdkr&tj|vrtd|dz���t|t��std�����dS) Nz+'libraries' option must be a list of tuples�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 separatorsrzMsecond element of each tuple in 'libraries' must be a dictionary (build info)) r%�list�DistutilsSetupError�tuple�lenr&r(�sep�dict)rr�libr2�
build_infos rr$zbuild_clib.check_library_listvs3�� ��)�T�*�*� A�%�?�A�A�
A�� ;� ;�C��c�5�)�)�
D�c�#�h�h�!�m�m�)�B�D�D�D� #��D�*��d�C�(�(�
=�)�<�=�=�=��d�{�{�r�v��}�}���4���)�+>�@C�A��+G�H�H�H��j�$�/�/�
;�)�:�;�;�;�
;�! ;� ;rc�`�|jsdSg}|jD]\}}|�|���|S)N)r�append)r� lib_names�lib_namer@s r�get_library_nameszbuild_clib.get_library_names�sK���~� ��4�� �&*�n� '� '�"�X�z����X�&�&�&�&��rc��|�|j��g}|jD]_\}}|�d��}|�t|tt
f��st
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%r9r;r:�extend)r� filenamesrDr@rGs r�get_source_fileszbuild_clib.get_source_files�s��������/�/�/�� �&*�n� &� &�"�X�z� �n�n�Y�/�/�G���j��4��-�&H�&H��)�4�6>�?�@�@�@�
���W�%�%�%�%��rc���|D]�\}}|�d��}|�t|ttf��st d|z���t|��}tjd|��|�d��}|�d��}|j�||j |||j
���}|j�|||j|j
�����dS)NrGrHzbuilding '%s' library�macrosr)�
output_dirrNrr)rOr)
rIr%r9r;r:r�infor�compilerr�create_static_libr)rrrDr@rGrNr�objectss rr1zbuild_clib.build_libraries�s��&/� >� >�"�X�z� �n�n�Y�/�/�G���j��4��-�&H�&H��)�4�6>�?�@�@�@��7�m�m�G��H�,�h�7�7�7�
�^�^�H�-�-�F�%�>�>�.�9�9�L��m�+�+�G�7;��39�9E�26�*� ,�>�>�G�
�M�+�+�G�X�7;��26�*�
,�
>�
>�
>�
>�3 >� >r)�__name__�
__module__�__qualname__�description�user_options�boolean_optionsr �help_optionsrr*r5r$rErLr1�rrrrs�������C�K�
�
�
�L���(�O�
�$� #�^� 5�
�L�
�
�
� D�D�D�4-�-�-�0!;�!;�!;�H � � ����>�>�>�>�>rr)
r(�distutils.corer�distutils.errors�distutils.sysconfigr� distutilsrr rr[rr�<module>r`s����
� � � �"�"�"�"�"�"�����2�2�2�2�2�2����������
u>�u>�u>�u>�u>��u>�u>�u>�u>�u>r
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists