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.7/distutils/tests/__pycache__/test_bdist_rpm.cpython-37.opt-2.pyc
B

!��g��@s�ddlZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
dZGdd	�d	ejejejej�Zd
d�Zedkr�ee��dS)
�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)�BuildRpmTestCasecsbytj�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__��:/usr/local/lib/python3.7/distutils/tests/test_bdist_rpm.pyrs
zBuildRpmTestCase.setUpcs>t�|j�|jdt_|jdtjdd�<tt|���dS)Nr�)	r�chdirrrr	rrr�tearDown)r)rrrr%szBuildRpmTestCase.tearDownZlinuxz,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�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)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)r�tmp_dir�pkg_dirr(�cmd�dist_createdrrr�
test_quiet-s0	



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��dS)Nrrzsetup.pyzfoo.pyrzMANIFEST.inzinclude foo.pyrr z0.1r!)r"r#r$r%r&r'Trr(zfoo-0.1-1.noarch.rpm)rr)zdist/foo-0.1-1.src.rpm)rr)zdist/foo-0.1-1.noarch.rpm)r*rr+r,r-r.r/r0rr1rr	rrr2r3r4r5r6r7r8�remove)rr9r:r(r;r<rrr�test_no_optimize_flagXs2




z&BuildRpmTestCase.test_no_optimize_flag)�__name__�
__module__�__qualname__rrr
Z
skipUnlessr	�platform�
startswithrZskipIfrr=r?�
__classcell__rr)rrrs 
%rcCs
t�t�S)N)r
Z	makeSuiterrrrr�
test_suite�srF�__main__)r
r	rZtest.supportrrZdistutils.corerZdistutils.command.bdist_rpmrZdistutils.testsrZdistutils.spawnrr0ZTempdirManagerZEnvironGuardZLoggingSilencerZTestCaserrFr@rrrr�<module>s	j