ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib64/python3.8/distutils/command/__pycache__/bdist_wininst.cpython-38.opt-1.pyc
U

e5d>@sxdZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
ddlTddlm
Z
ddlmZGd	d
d
eZdS)zzdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.N)Command)get_platform)create_treeremove_tree)*)get_python_version)logc
seZdZdZddddefdddd	d
ddd
dddg
ZddddgZejdkZ	fddZ
ddZddZddZ
ddZd'd!d"Zd#d$Zd%d&ZZS)(
bdist_wininstz-create an executable installer for MS Windows)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=pz;platform name to embed in generated filenames (default: %s))	keep-tempkzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)no-target-compilecz/do not compile .py to .pyc on the target system)no-target-optimizeoz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=dz-directory to put final built distributions in)zbitmap=bz>bitmap to use for the installer instead of python-powered logo)ztitle=tz?title to display on the installer background instead of default)
skip-buildNz2skip rebuilding everything (for testing/debugging))zinstall-script=NzUbasename of installation script to be run after installation or before deinstallation)zpre-install-script=Nz{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution)zuser-access-control=Nzspecify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACrr
rrwin32cs tj||tdtddS)Nz^bdist_wininst command is deprecated since Python 3.8, use bdist_wheel (wheel packages) instead)super__init__warningswarnDeprecationWarning)selfargskw	__class__7/usr/lib64/python3.8/distutils/command/bdist_wininst.pyr?s
zbdist_wininst.__init__cCsRd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_dS)Nr)
	bdist_dir	plat_name	keep_tempno_target_compileno_target_optimizetarget_versiondist_dirbitmaptitle
skip_buildinstall_scriptpre_install_scriptuser_access_control)rr!r!r"initialize_optionsEsz bdist_wininst.initialize_optionscCs|dd|jdkrR|jr6|jr6|jd}|j|_|dj}tj	
|d|_|js^d|_|js|jrt
}|jr|j|krtd|f||_|ddd|jr|jjD]}|jtj	|krqqtd|jdS)	Nbdist)r,r,ZwininstzMtarget version can only be %s, or the '--skip-build' option must be specified)r)r))r$r$z(install_script '%s' not found in scripts)Zset_undefined_optionsr#r,r$distributionZget_command_objget_finalized_command
bdist_baseospathjoinr(has_ext_modulesrZDistutilsOptionErrorr-scriptsbasename)rr1r5Z
short_versionscriptr!r!r"finalize_optionsUs>
zbdist_wininst.finalize_optionsc
Cstjdkr&|js|jr&td|js6|d|jddd}|j	|_
|j|_d|_|j|_|d}d|_
d|_|jr|j}|sd	tjdd
}d|j|f}|d}tj|jd||_d
D],}|}|dkr|d}t|d||qtd|j	|tjdtj|j	d|tjd=ddlm}|}	|j }
|j!|	d|j	d}|"||
|j#|jrt$}nd}|jj%&d||'|
ft(d|t)||j*st+|j	|j,ddS)Nrz^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformbuildinstall)Zreinit_subcommandsrinstall_libz%d.%drz.%s-%slib)ZpurelibZplatlibheadersr:datarCz/Include/$dist_nameZinstall_zinstalling to %sZPURELIB)mktempzip)Zroot_diranyr	zremoving temporary file '%s')dry_run)-sysplatformr3r9Zhas_c_librariesZDistutilsPlatformErrorr,Zrun_commandZreinitialize_commandr#rootZwarn_dirr$compileoptimizer(version_infor4r6r7r8Z
build_baseZ	build_libuppersetattrrinfoZensure_finalizedinsertrunZtempfilerEget_fullnameZmake_archive
create_exer*rZ
dist_filesappendget_installer_filenamedebugremover%rrH)
rr?rAr(Zplat_specifierr>keyvaluerEZarchive_basenamefullnamearcnameZ	pyversionr!r!r"rS{sr







zbdist_wininst.runcCsZg}|jj}|d|jpdd}dd}dD]B}t||d}|r0|d|||f}|d|||fq0|d	|jr|d
|j|d|||d|j|d
|j|j	r|d|j	|j
r|d|j
|jp|j}|d||ddl
}ddl}	d||
|	jf}
|d|
d|S)Nz
[metadata]r2
cSs|ddS)Nr^z\n)replace)sr!r!r"escapesz)bdist_wininst.get_inidata.<locals>.escape)ZauthorZauthor_emaildescriptionZ
maintainerZmaintainer_emailnameZurlversionz
    %s: %sz%s=%sz
[Setup]zinstall_script=%szinfo=%sztarget_compile=%dztarget_optimize=%dztarget_version=%szuser_access_control=%sztitle=%srzBuilt %s with distutils-%sz
build_info=%s)r3metadatarVZlong_descriptiongetattr
capitalizer-r&r'r(r/r+rTtime	distutilsctime__version__r8)rlinesrerQrarcrDr+rhriZ
build_infor!r!r"get_inidatas>

zbdist_wininst.get_inidataNc
CsHddl}||j|}||}|d||r`t|d}|}W5QRXt|}	nd}	t|d}
|
	|
|r|
	|t|tr|
d}|d}|jrt|jddd	}|
d}W5QRX||d
}n|d}|
	||ddt||	}
|
	|
t|d}|
	|W5QRXW5QRXdS)
Nrzcreating %srbwbmbcsrzlatin-1)encodings
z<iiii{V4)structZmkpathr)rmrWZannounceopenreadlenwrite
get_exe_bytes
isinstancestrencoder.Zpack)rr]r\r*rtZcfgdatainstaller_namefZ
bitmapdataZ	bitmaplenfiler<Zscript_dataheaderr!r!r"rUsD






zbdist_wininst.create_execCsD|jr&tj|jd||j|jf}ntj|jd||jf}|S)Nz%s.%s-py%s.exez	%s.%s.exe)r(r6r7r8r)r$)rr\r}r!r!r"rW1s

z$bdist_wininst.get_installer_filenamec	Cs$t}|jrl|j|krl|jdkr&d}q|jdkr6d}q|jdkrFd}q|jdkrVd}q|jdkrfd	}qd
}n@zddlm}Wntk
rd
}YnX|d
d}|d}tjt	}|j
dkr|j
dddkr|j
dd}nd}tj|d||f}t|d}z|WS|
XdS)Nz2.4z6.0z7.1z2.5z8.0z3.2z9.0z3.4z10.0z14.0r)CRT_ASSEMBLY_VERSION.z.0rwinr2zwininst-%s%s.exern)rr(ZmsvcrtrImportError	partitionr6r7dirname__file__r$r8rucloserv)	rZcur_versionZbvrmajorZ	directoryZsfixfilenamer~r!r!r"ry>s8	






zbdist_wininst.get_exe_bytes)N)__name__
__module____qualname__rbrZuser_optionsZboolean_optionsrIrJZ_unsupportedrr0r=rSrmrUrWry
__classcell__r!r!rr"r	s>%
&Q.
7
r	)__doc__r6rIrZdistutils.corerZdistutils.utilrZdistutils.dir_utilrrZdistutils.errorsZdistutils.sysconfigrrirr	r!r!r!r"<module>s