Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_bdist_rpm.cpython-311.pyc

�

SԚgX����dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dZGd	�d
ejejejej��Zedkrej��dSdS)z&Tests for distutils.command.bdist_rpm.�N)�
requires_zlib)�Distribution)�	bdist_rpm)�support)�find_executablez�from distutils.core import setup
import foo

setup(name='foo', version='0.1', py_modules=['foo'],
      url='xxx', author='xxx', author_email='xxx')

c����eZdZ�fd�Z�fd�Zejej�	d��d��e
��ejed��dud��ejed��dud	��ejej
jd
��d�����������Zejej�	d��d��e
��ejed��dud��ejed��dud	��ejej
jd
��d�����������Z�xZS)
�BuildRpmTestCasec�V��	tj�d��n"#t$rt	jd���wxYwt
t|�����tj
��|_tjtjdd�f|_
dS)NzUTF-8z(sys.executable is not encodable to UTF-8)�sys�
executable�encode�UnicodeEncodeError�unittest�SkipTest�superr	�setUp�os�getcwd�old_location�argv�old_sys_argv��self�	__class__s ��;/usr/local/lib/python3.11/distutils/tests/test_bdist_rpm.pyrzBuildRpmTestCase.setUps����	P��N�!�!�'�*�*�*�*��!�	P�	P�	P��#�$N�O�O�O�	P����	���%�%�+�+�-�-�-��I�K�K����H�c�h�q�q�q�k�1����s	�#�Ac����tj|j��|jdt_|jdtjdd�<t
t|�����dS)Nr�)	r�chdirrrrrrr	�tearDownrs �rrzBuildRpmTestCase.tearDown%s_���
���"�#�#�#��$�Q�'����'��*�������
���%�%�.�.�0�0�0�0�0��linuxz,spurious sdtout/stderr output under Mac OS X�rpmNzthe rpm command is not found�rpmbuildz!the rpmbuild command is not foundz'PYTHONSAFEPATH changes default sys.pathc	��|���}|tjd<tj�|d��}tj|��|�|dft��|�|dfd��|�|dfd��|�|dfd	��tdd
dgdddd���}d|_	tj
|��dgt_t|��}d
|_d|_|���|���tjtj�|d����}|�d|��|�d|j��|�d|j��dS�N�HOME�foozsetup.pyzfoo.py�#zMANIFEST.inzinclude foo.py�README�z0.1�xxx)�name�version�
py_modules�url�author�author_emailTr�distzfoo-0.1-1.noarch.rpm)r�anyzdist/foo-0.1-1.src.rpm)rr3zdist/foo-0.1-1.noarch.rpm)�mkdtempr�environ�path�join�mkdir�
write_file�SETUP_PYr�script_namerrrr�
fix_python�quiet�ensure_finalized�run�listdir�assertIn�
dist_files�r�tmp_dir�pkg_dirr2�cmd�dist_createds      r�
test_quietzBuildRpmTestCase.test_quiet-s����,�,�.�.��$��
�6���'�,�,�w��.�.��
����������*�-�x�8�8�8�����(�+�S�1�1�1�����-�0�2B�C�C�C�����(�+�R�0�0�0��U�u�,1�7�$)�U�-2�4�4�5�5��&���
�������<�����o�o�������	����������	�	�	��z�"�'�,�,�w��"?�"?�@�@���
�
�,�l�;�;�;�	
�
�
�D�d�o�V�V�V��
�
�G���Y�Y�Y�Y�Yr c	���|���}|tjd<tj�|d��}tj|��|�|dft��|�|dfd��|�|dfd��|�|dfd	��tdd
dgdddd���}d|_	tj
|��dgt_t|��}d
|_d|_|���|���tjtj�|d����}|�d|��|�d|j��|�d|j��tjtj�|dd����dSr%)r4rr5r6r7r8r9r:rr;rrrrr<r=r>r?r@rArB�removerCs      r�test_no_optimize_flagz&BuildRpmTestCase.test_no_optimize_flag[s����,�,�.�.��$��
�6���'�,�,�w��.�.��
����������*�-�x�8�8�8�����(�+�S�1�1�1�����-�0�2B�C�C�C�����(�+�R�0�0�0��U�u�,1�7�$)�U�-2�4�4�5�5��&���
�������<�����o�o�������	����������	�	�	��z�"�'�,�,�w��"?�"?�@�@���
�
�,�l�;�;�;�	
�
�
�D�d�o�V�V�V��
�
�G���Y�Y�Y�
�	�"�'�,�,�w��0F�G�G�H�H�H�H�Hr )�__name__�
__module__�__qualname__rrr�
skipUnlessr�platform�
startswithr�skipIfr�flags�	safe_pathrHrK�
__classcell__)rs@rr	r	s�������
2�2�2�2�2�1�1�1�1�1��X����0�0��9�9�G�I�I��]�_�_��X�_�_�_�U�+�+�t�3�3�5�5��X�_�_�_�Z�0�0�D�8�8�:�:��X�_�S�Y�(�>�@�@� Z� Z�@�@�:�:�5�5��_�I�I� Z�H�X����0�0��9�9�G�I�I��]�_�_��X�_�_�_�U�+�+�t�3�3�5�5��X�_�_�_�Z�0�0�D�8�8�:�:��X�_�S�Y�(�>�@�@�!I�!I�@�@�:�:�5�5��_�I�I�!I�!I�!I�!I�!Ir r	�__main__)�__doc__rrr�test.supportr�distutils.corer�distutils.command.bdist_rpmr�distutils.testsr�distutils.spawnrr:�TempdirManager�EnvironGuard�LoggingSilencer�TestCaser	rL�main�r r�<module>rcs���,�,�����
�
�
�
�	�	�	�	�&�&�&�&�&�&�'�'�'�'�'�'�1�1�1�1�1�1�#�#�#�#�#�#�+�+�+�+�+�+���qI�qI�qI�qI�qI�w�-��+��.��(�qI�qI�qI�f�z����H�M�O�O�O�O�O��r 

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists