HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/distutils/tests/__pycache__/test_bdist_rpm.cpython-310.opt-2.pyc
o

�i��@s�	ddlZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
dZGdd	�d	ejejejej�Zd
d�ZedkrMee��dSdS)
�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�dud	�e�ed
�dud�dd
�����Z
e�ej�	d�d�e
�e�ed�dud	�e�ed
�dud�dd�����Z�ZS)�BuildRpmTestCasecs\ztj�d�Wntyt�d��wtt|���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__��;/usr/local/lib/python3.10/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_modules�urlZauthorZ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-s2	

�
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	rrr0r1r2r3r4r5r6�remover7rrr�test_no_optimize_flagXs4


�
z&BuildRpmTestCase.test_no_optimize_flag)�__name__�
__module__�__qualname__rrr
Z
skipUnlessr	�platform�
startswithrZskipIfrr9r;�
__classcell__rrrrrs2
���$���rcCs
t�t�S)N)r
Z	makeSuiterrrrr�
test_suite�s
rB�__main__)r
r	rZtest.supportrrZdistutils.corerZdistutils.command.bdist_rpmrZdistutils.testsrZdistutils.spawnrr.ZTempdirManagerZEnvironGuardZLoggingSilencerZTestCaserrBr<rrrr�<module>s&	�m�