Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/distutils/tests/__pycache__/test_bdist_rpm.cpython-38.pyc
U

@��g��@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZddl
mZdZGd	d
�d
ejejejej�Zdd�Zed
kr�ee��dS)z&Tests for distutils.command.bdist_rpm.�N)�run_unittest�
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')

cs�eZdZ�fdd�Z�fdd�Ze�ej�	d�d�e
e�ed�dkd	�e�ed
�dkd�dd
�����Z
e�ej�	d�d�e
e�ed�dkd	�e�ed
�dkd�dd�����Z�ZS)�BuildRpmTestCasecsbztj�d�Wntk
r.t�d��YnXtt|���t	�
�|_tjtjdd�f|_
dS)NzUTF-8z(sys.executable is not encodable to UTF-8)�sys�
executable�encode�UnicodeEncodeError�unittestZSkipTest�superr�setUp�os�getcwd�old_location�argv�old_sys_argv��self��	__class__��=/opt/cppython/lib/python3.8/distutils/tests/test_bdist_rpm.pyrs
zBuildRpmTestCase.setUpcs>t�|j�|jdt_|jdtjdd�<tt|���dS)Nr�)	r�chdirrrr	rrr�tearDownrrrrr%szBuildRpmTestCase.tearDown�linuxz,spurious sdtout/stderr output under Mac OS XZrpmNzthe rpm command is not foundZrpmbuildz!the rpmbuild command is not foundcCs�|��}|tjd<tj�|d�}t�|�|�|dft�|�|dfd�|�|dfd�|�|dfd	�tdd
dgdddd��}d|_	t�
|�dgt_t
|�}d
|_d|_|��|��t�tj�|d��}|�d|�|�d|j�|�d|j�dS�N�HOMEZfoozsetup.pyzfoo.py�#zMANIFEST.inzinclude foo.pyZREADME�z0.1Zxxx)�name�versionZ
py_modulesZurlZauthorZauthor_emailTr�distzfoo-0.1-1.noarch.rpm)r�anyzdist/foo-0.1-1.src.rpm)rr&zdist/foo-0.1-1.noarch.rpm)�mkdtempr�environ�path�join�mkdir�
write_file�SETUP_PYr�script_namerr	rr�
fix_python�quiet�ensure_finalized�run�listdir�assertIn�
dist_files�rZtmp_dirZpkg_dirr%�cmdZdist_createdrrr�
test_quiet-s4	

�
zBuildRpmTestCase.test_quietcCs|��}|tjd<tj�|d�}t�|�|�|dft�|�|dfd�|�|dfd�|�|dfd	�tdd
dgdddd��}d|_	t�
|�dgt_t
|�}d
|_d|_|��|��t�tj�|d��}|�d|�|�d|j�|�d|j�t�tj�|dd��dSr)r'rr(r)r*r+r,r-rr.rr	rrr/r0r1r2r3r4r5�remover6rrr�test_no_optimize_flagXs6


�
z&BuildRpmTestCase.test_no_optimize_flag)�__name__�
__module__�__qualname__rrr
Z
skipUnlessr	�platform�
startswithrZskipIfrr8r:�
__classcell__rrrrrs0
���$���rcCs
t�t�S)N)r
Z	makeSuiterrrrr�
test_suite�srA�__main__)�__doc__r
r	rZtest.supportrrZdistutils.corerZdistutils.command.bdist_rpmrZdistutils.testsrZdistutils.spawnrr-ZTempdirManagerZEnvironGuardZLoggingSilencerZTestCaserrAr;rrrr�<module>s"	�m

F1le Man4ger