� ,�Re�@��b�dZddlmZmZddlmZddlmZddlZddl Z ddl Z ddl Z ddl Z ddl mZmZddlmZddlmZd d lmZdd lmZmZd �Zd �Zd�Zd�ZGd�de��Ze�d� ����Z!d�Z"d�Z#d�Z$ddd�Z%d�Z&d�Z'd�Z(gd�Z) d d�Z*dS)!z6setuptools.command.bdist_egg Build .egg distributions�)� remove_tree�mkpath)�log)�CodeTypeN)�get_build_platform� Distribution)�Library)�Command�)�ensure_directory)�get_path�get_python_versionc� �td��S)N�purelib)r ����/builddir/build/BUILDROOT/alt-python311-setuptools-65.6.3-2.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/setuptools/command/bdist_egg.py� _get_purelibrs�� �I� � �rc��d|vr%tj�|��d}|�d��r |dd�}|S)N�.r�modulei����)�os�path�splitext�endswith)�filenames r� strip_modulersM�� �h����7�#�#�H�-�-�a�0������"�"�!��C�R�C�=�� �Orc#�K�tj|��D]5\}}}|���|���|||fV��6dS)zbDo os.walk in a reproducible way, independent of indeterministic filesystem readdir order N)r�walk�sort)�dir�base�dirs�filess r� sorted_walkr%"s`���� �W�S�\�\� � ���d�E� � � � � � � � � � � � ��D�%������ � rc���tjd�����}t|d��5}|�||z��ddd��dS#1swxYwYdS)Na� def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, importlib.util __file__ = pkg_resources.resource_filename(__name__, %r) __loader__ = None; del __bootstrap__, __loader__ spec = importlib.util.spec_from_file_location(__name__,__file__) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) __bootstrap__() �w)�textwrap�dedent�lstrip�open�write)�resource�pyfile�_stub_template�fs r� write_stubr1,s����_� & �  �  ��V�X�X�� �f�c� � �+�a� �����)�*�*�*�+�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�+�+s�A�A!�$A!c��eZdZdZdddde��zfdddd gZgd �Zd �Zd �Zd �Z d�Z d�Z d�Z d�Z d�Zd�Zd�Zd�ZdS)� bdist_eggzcreate an "egg" distribution)z bdist-dir=�bz1temporary directory for creating the distributionz plat-name=�pz;platform name to embed in generated filenames (default: %s))�exclude-source-filesNz+remove all .py files from the generated egg)� keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z dist-dir=�dz-directory to put final built distributions in)� skip-buildNz2skip rebuilding everything (for testing/debugging))r7r:r6c�h�d|_d|_d|_d|_d|_d|_d|_dS)Nr)� bdist_dir� plat_name� keep_temp�dist_dir� skip_build� egg_output�exclude_source_files��selfs r�initialize_optionszbdist_egg.initialize_optionsSs:������������� �������$(��!�!�!rc �b�|�d��x}|_|j|_|j�?|�d��j}t j�|d��|_|j�t��|_|� dd��|j ��tdd|j |jt��|j���o|j��� ��}t j�|j|dz��|_ dSdS)N�egg_info�bdist�egg)r?r?z.egg)�get_finalized_command�ei_cmdrGr<� bdist_baserr�joinr=r�set_undefined_optionsrAr�egg_name� egg_versionr� distribution�has_ext_modulesr?)rDrKrL�basenames r�finalize_optionszbdist_egg.finalize_options\s ��#�9�9�*�E�E�E������� � �>� !��3�3�G�<�<�G�J��W�\�\�*�e�<�<�D�N� �>� !�/�1�1�D�N� �"�"�7�,D�E�E�E� �?� "�$��d�F�O�V�-?�"�$�$��!�1�1�3�3�F������h�j�j� � !�g�l�l�4�=�(�V�:K�L�L�D�O�O�O� #� "rc��|j|�d��_tj�tj�t������}|jj gc}|j_ |D]�}t|t��r�t|��dkr�tj� |d��r�tj�|d��}tj�|��}||ks"|�|tjz��r"|t|��dzd�|df}|jj �|���� t#jd|j��|�ddd���||j_ dS#||j_ wxYw)N�installr r�zinstalling package data to %s� install_data)�force�root)r<rJ� install_librr�normcase�realpathrrQ� data_files� isinstance�tuple�len�isabs� startswith�sep�appendr�info� call_command)rD� site_packages�old�itemr]� normalizeds r�do_install_datazbdist_egg.do_install_datats���<@�N��"�"�9�-�-�9���(�(���)9�)9�,�.�.�)I�)I�J�J� �,0�,=�,H�"�)��T� � )�� 6� 6�D��$��&�&� J�3�t�9�9��>�>��7�=�=��a��)�)�J�!�w�/�/��Q��8�8�H�!#��!1�!1�(�!;�!;�J�!�]�2�2�j�6K�6K�%���.�7�7�2� (��M�(:�(:�Q�(>�(?�(?�@�$�q�'�I�� � � (� /� /�� 5� 5� 5� 5� /� �H�4�d�n� E� E� E� � � �n�A�D� � A� A� A�+.�D� � (� (� (��3�D� � (� .� .� .� .s �2G�Gc��|jgS)N)rArCs r� get_outputszbdist_egg.get_outputs�s ���� � rc ��tD]}|�||j���|�d|j��|�d|j��|j|fi|��}|�|��|S)z8Invoke reinitialized command `cmdname` with keyword argsr@�dry_run)�INSTALL_DIRECTORY_ATTRS� setdefaultr<r@rp�reinitialize_command� run_command)rD�cmdname�kw�dirname�cmds rrgzbdist_egg.call_command�s���.� 3� 3�G� �M�M�'�4�>� 2� 2� 2� 2� � � �l�D�O�4�4�4� � � �i���.�.�.�'�d�'��6�6�2�6�6�� ����!�!�!�� rc�� �|�d��tjd|j��|�d��}|j}d|_|j���r|js|�d��|� dd���}||_|� ��\}}g|_ g}t|��D]�\}}tj�|��\} } tj�|jt#| ��dz��} |j �| ��tjd |��|js-t)tj�|��| ��|�| ��|�tjd ��||<��|r|�|��|jjr|���|j} tj�| d ��} |�| ��|jjrMtj�| d ��}tjd |��|� d|d���|�| ��tj�| d��}|r�tjd|��|jspt=|��t?|d��}|� d�|����|� d��|�!��nOtj�"|��r0tjd|��|jstj#|��tItj�| d ��|�%����tj�&tj�|j'd����rtj(d��|j)r|�*��tW|j,| |j-|j|�.�����|j/sta|j|j���tc|jdg���dte��|j,f��dS)NrGzinstalling library code to %srV� build_clibr[r)�warn_dir�.pyzcreating stub loader for %s�/�EGG-INFO�scriptszinstalling scripts to %s�install_scriptsrW)� install_dir�no_epznative_libs.txtz writing %s�wt� z removing %sz depends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6! Use the install_requires/extras_require setup() args instead.)�verboserp�mode�rp� dist_filesr3)3rtrrfr<rJrZrQ�has_c_librariesr@rg�get_ext_outputs�stubs� enumeraterrrrMrrerpr1rS�replacerd� byte_compiler^rlrr�copy_metadata_tor r+r,�close�isfile�unlink�write_safety_flag�zip_safe�existsrG�warnrB� zap_pyfiles� make_zipfilerAr�� gen_headerr>r�getattrr)rD�instcmd�old_rootrx� all_outputs� ext_outputs� to_compiler5�ext_namer�extr.� archive_rootrG� script_dir� native_libs� libs_files r�runz bdist_egg.run�s��� ����$�$�$� ��0�$�.�A�A�A��,�,�Y�7�7���<���� � � � ,� ,� .� .� +�t�� +� � � �\� *� *� *���� ���:�:���� �#'�#7�#7�#9�#9� � �[��� �� �&�{�3�3� ;� ;�M�Q���G�,�,�X�6�6�M�H�c��W�\�\�$�.�,�x�2H�2H�"'�3(�)�)�F� �J� � �f� %� %� %� �H�2�H� =� =� =��<� ?��2�7�+�+�H�5�5�v�>�>�>� � � �f� %� %� %�%�-�-�b�f�c�:�:�K��N�N� � )� � � �Z� (� (� (� � � '� #� � � � "� "� "��~� ��7�<�<� �j�9�9�� � � �H���� � � $� '�����h� �:�:�J� �H�/�� <� <� <� � � �/�Z�$%� � '� '� '� ���h�'�'�'��g�l�l�8�->�?�?� � � '� �H�\�;� /� /� /��<� "� ��-�-�-� ��d�3�3� ����� � �+� 6� 6�7�7�7�����%�%�%����!�!�!�� �W�^�^�K� (� (� '� �H�]�K� 0� 0� 0��<� '�� �+�&�&�&�� �G�L�L��z� 2� 2�D�M�M�O�O� � � � �7�>�>�"�'�,�,�t�}�m�D�D� E� E� � �H�P� � � � � $� � � � � � � � �T�_�l�D�L�!�\����0A�0A� C� C� C� C��~� >� ���� � =� =� =� =� ��!�<��4�4�;�;� �,�.�.��� @� B� B� B� B� Brc ��tjd��t|j��D�]1\}}}|D�]&}tj�||��}|�d��r)tjd|��t j |��|�d��r�|}d}tj ||��}tj�|tj |� d��dz��} tjd|�d | �d ��� t j| ��n#t$rYnwxYwt j|| ����(��3dS) Nz+Removing .py files from temporary directoryr|z Deleting %s� __pycache__z#(?P.+)\.(?P[^.]+)\.pyc�name�.pyczRenaming file from [z] to [�])rrf�walk_eggr<rrrMr�debugr��re�match�pardir�group�remove�OSError�rename) rDr"r#r$r�r�path_old�pattern�m�path_news rr�zbdist_egg.zap_pyfiles�sj�� ��>�?�?�?�!)�$�.�!9�!9� 2� 2� �D�$��� 2� 2���w�|�|�D�$�/�/���=�=��'�'�$��I�m�T�2�2�2��I�d�O�O�O��=�=��/�/�2�#�H�D�G����$�/�/�A�!�w�|�|��b�i�������6�)A� C� C�H��H�H�#�8�8�X�X�X�/�0�0�0��� �(�+�+�+�+��"�����������I�h��1�1�1��+ 2� 2� 2s�D3�3 E�?Ec��t|jdd��}|�|Stjd��t |j|j��S)Nr�z4zip_safe flag not set; analyzing archive contents...)r�rQrr�� analyze_eggr<r�)rD�safes rr�zbdist_egg.zip_safesF���t�(�*�d�;�;�� � ��K� ��G�H�H�H��4�>�4�:�6�6�6rc��dS)Nr'rrCs rr�zbdist_egg.gen_header s���src��tj�|j��}tj�|d��}|jjjD]q}|�|��rZtj�||t|��d���}t|��|� ||���rdS)z*Copy metadata (egg info) to the target_dir�N) rr�normpathrGrMrK�filelistr$rcrar � copy_file)rD� target_dir� norm_egg_info�prefixr�targets rr�zbdist_egg.copy_metadata_tos�����(�(���7�7� �����m�R�0�0���K�(�.� -� -�D����v�&�&� -�����j�$�s�6�{�{�|�|�2D�E�E�� ��(�(�(����t�V�,�,�,��  -� -rc��g}g}|jdi}t|j��D]�\}}}|D]^}tj�|��d���t vr|�|||z���_|D]1}|||zdz|tj�||��<�2��|j � ��r�|� d��}|j D]�} t| t��r�|�| j��} |�| ��}tj�|���d��sWtj�tj�|j|����r|�|����||fS)zAGet a list of relative paths to C extensions in the output distror�rWr}� build_extzdl-)r<r%rrr�lower�NATIVE_EXTENSIONSrerMrQrRrJ� extensionsr_r �get_ext_fullnamer��get_ext_filenamerSrcr�) rDr�r��pathsr"r#r$r� build_cmdr��fullnames rr�zbdist_egg.get_ext_outputss���� �� ����$��!,�T�^�!<�!<� G� G� �D�$��!� ?� ?���7�#�#�H�-�-�a�0�6�6�8�8��>�>�� � G� G��7<�T�{�7?�8@�BE�8F��b�g�l�l�4��2�2�3�3� G� � � ,� ,� .� .� 5��2�2�;�?�?�I� �+� 5� 5���c�7�+�+���$�5�5�c�h�?�?��$�5�5�h�?�?���w�'�'��1�1�<�<�U�C�C�5��w�~�~�b�g�l�l�4�>�8�&L�&L�M�M�5�#�*�*�8�4�4�4���K�'�'rN)�__name__� __module__� __qualname__� descriptionr� user_options�boolean_optionsrErTrlrnrgr�r�r�r�r�r�rrrr3r3<s������2�K� >� �s�,�.@�.@�.B�.B�C� D� 8� .� :� ?��L� ���O�)�)�)�M�M�M�0/�/�/�2!�!�!����OB�OB�OB�b2�2�2�47�7�7���� -� -� -�(�(�(�(�(rr3z.dll .so .dylib .pydc#�K�t|��}t|��\}}}d|vr|�d��|||fV�|D]}|V��dS)z@Walk an unpacked egg's contents, skipping the metadata directoryr~N)r%�nextr�)�egg_dir�walkerr"r#r$�bdfs rr�r�;sy���� �� !� !�F��V� � ��D�$���T��� � � �J���� ��e� ��������� � � � ��rc���t���D]G\}}tj�tj�|d|����r|cS�Ht ��sdSd}t|��D]t\}}}|D]k}|�d��s|�d��r�-|�d��s|�d��rt||||��o|}�l�u|S)Nr~FTr|z.pywr�z.pyo) � safety_flags�itemsrrr�rM�can_scanr�r� scan_module) r�r��flag�fnr�r"r#r$r�s rr�r�Fs�� �&�&�(�(�����b� �7�>�>�"�'�,�,�w� �B�?�?� @� @� ��K�K�K� � �:�:���u� �D�%�g�.�.�H�H���d�E�� H� H�D��}�}�U�#�#� H�t�}�}�V�'<�'<� H�����v�&�&� H�$�-�-��*?�*?� H�"�7�D�$��>�>�G�4���  H� �Krc��t���D]�\}}tj�||��}tj�|��r*|�t |��|krtj|���n|�Lt |��|kr9t|d��}|� d��|� ����dS)Nr�r�) r�r�rrrMr��boolr�r+r,r�)r�r�r�r�r0s rr�r�Xs��� �&�&�(�(�����b� �W�\�\�'�2� &� &�� �7�>�>�"� � � ��|�t�D�z�z�T�1�1�� �"� � � �� � �$�t�*�*��"4�"4��R����A� �G�G�D�M�M�M� �G�G�I�I�I���rzzip-safez not-zip-safe)TFc���tj�||��}|dd�|vrdS|t|��dzd��tjd��}||rdpdztj�|��dz}tjdkrd }nd }t|d ��}|� |��tj |��} |� ��d} t�t!| ����} d D]} | | vrt#jd || ��d} �d| vr!dD]} | | vrt#jd|| ��d} �| S)z;Check whether module possibly uses unsafe-for-zipfile stuffN�����TrWrr�r)��� ��rb)�__file__�__path__z%s: module references %sF�inspect) � getsource� getabsfile� getsourcefile�getfilegetsourcelines� findsource� getcomments� getframeinfo�getinnerframes�getouterframes�stack�tracez"%s: module MAY be using inspect.%s)rrrMrar�rdr�sys� version_infor+�read�marshal�loadr��dict�fromkeys� iter_symbolsrr�) r�r"r�r�r�pkgr�skipr0�coder��symbols�bads rr�r�ksu���w�|�|�D�$�'�'�H�����}�����t� �s�7�|�|�a�� � � !� )� )�"�&�#� 6� 6�C� �C�K�C�%�2� &���)9�)9�$�)?�)?��)B� B�F� ��&� � ������ �X�t���A��F�F�4�L�L�L� �<��?�?�D��G�G�I�I�I� �D��m�m�L��.�.�/�/�G�'���� �'�>�>� �H�/��� =� =� =��D���G��� � � �C� �g�~�~���=�v�s�K�K�K���� �Krc#��K�|jD]}|V��|jD]G}t|t��r|V��t|t��rt |��D]}|V���HdS)zBYield names and strings used by `code` and its nested code objectsN)�co_names� co_constsr_�strrr)rr��consts rrr�s������ ����� � � � ������ �e�S� !� !� ��K�K�K�K� ��x� (� (� �$�U�+�+� � ��� � � � �� �rc��tj�d��stjdkrdStjd��tjd��dS)N�java�cliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)r��platformrcrr�rrrr�r��se�� �<� "� "�6� *� *��s�|�u�/D�/D��t��H� @�A�A�A��H�I�J�J�J�J�Jr)r[r�rX� install_baseTr'c����ddl}ttj�|������t jd|�����fd�}|r|jn|j}�sP|� |||���} t���D]\} } } || | | ���| � ��n#t���D]\} } } |d| | ���|S)aqCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. rNr�z#creating '%s' and adding '%s' to itc�X��|D]�}tj�tj�||����}tj�|��rG|t ���dzd�}�s|�||��tjd|����dS)NrWz adding '%s') rrr�rMr�rar,rr�)�zrw�namesr�rr5�base_dirrps ��r�visitzmake_zipfile..visit�s����� ,� ,�D��7�#�#�B�G�L�L��$�$?�$?�@�@�D��w�~�~�d�#�#� ,���X����*�+�+�,���%��G�G�D�!�$�$�$�� �-��+�+�+��  ,� ,r)� compression) �zipfilerrrrwrrf� ZIP_DEFLATED� ZIP_STORED�ZipFiler%r�) � zip_filenamerr�rp�compressr�rrrrrwr#r$s ` ` rr�r��s�����N�N�N� �2�7�?�?�<� (� (�'�:�:�:�:��H� 2�L�(�K�K�K�,�,�,�,�,�,�+3�J�'�&�&��8J�K� �(� �O�O�L�$�K�O� H� H��$/��$9�$9� %� %� �G�T�5� �E�!�W�e� $� $� $� $� ��� � � � �$/��$9�$9� (� (� �G�T�5� �E�$��� '� '� '� '� �r)rrTr')+�__doc__�distutils.dir_utilrr� distutilsr�typesrr�rr�r(r�� pkg_resourcesrr�setuptools.extensionr � setuptoolsr �_pathr � sysconfigr rrrr%r1r3r�r��splitr�r�r�r�r�r�rr�rqr�rrr�r's����3�2�2�2�2�2�2�2������������� � � � � � � � � � � � ���������:�:�:�:�:�:�:�:�(�(�(�(�(�(�������$�$�$�$�$�$�2�2�2�2�2�2�2�2������� � � � +� +� +� y(�y(�y(�y(�y(��y(�y(�y(�x�M�M�"8�">�">�"@�"@�A�A��������$ � � � � ��� � ���D � � �J�J�J����� IM�������r