HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python2.7/distutils/command/bdist_wininst.pyc
�
;;Wgc@s�dZdZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZdefd��YZdS(
szdistutils.command.bdist_wininst

Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program.s$Id$i����N(tget_python_version(tCommand(tremove_tree(tDistutilsOptionErrortDistutilsPlatformError(tDistutilsFileError(tlog(tget_platformt
bdist_wininstcBs�eZdZd,ddde�fdddd	fd
d+ddfd-d.d/d0d1d2d3d4d5g
Zdd
ddgZd$�Zd%�Zd&�Z	d'�Z
d+d(�Zd)�Zd*�Z
RS(6s-create an executable installer for MS Windowss
bdist-dir=s1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archivestarget-version=s!require a specific python versions on the target systemsno-target-compiletcs/do not compile .py to .pyc on the target systemsno-target-optimizetos;do not compile .py to .pyo (optimized) on the target systems	dist-dir=tds-directory to put final built distributions insbitmap=tbs>bitmap to use for the installer instead of python-powered logostitle=tts?title to display on the installer background instead of defaults
skip-builds2skip rebuilding everything (for testing/debugging)sinstall-script=sUbasename of installation script to be run after installation or before deinstallationspre-install-script=s{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distributionsuser-access-control=s�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UACcCsyd|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptno_target_compiletno_target_optimizettarget_versiontdist_dirtbitmapttitlet
skip_buildtinstall_scripttpre_install_scripttuser_access_control(tself((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pytinitialize_optionsAs												cCsV|jdd	�|jdkr|jrR|jrR|jjd�}|j|_n|jd�j}t	j
j|d�|_n|js�d|_n|jr�|jj
�r�t�}|jr�|j|kr�td|f�n||_n|jdd
d�|jrRxF|jjD]%}|jt	j
j|�krPqqWtd|j�ndS(NtbdistRtwininsttsMtarget version can only be %s, or the '--skip-build' option must be specifiedRRs(install_script '%s' not found in scripts(RR(RR(RR(tset_undefined_optionsRRRRtdistributiontget_command_objtget_finalized_commandt
bdist_basetostpathtjoinRthas_ext_modulesRRRtscriptstbasename(RR R't
short_versiontscript((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pytfinalize_optionsSs4		
		c
Cs�tjdkr<|jj�s-|jj�r<td��n|jsU|jd�n|jddd�}|j	|_
|j|_d|_|j|_|jd�}d|_
d|_|jj�rB|j}|s�|js�td	��tjdd
!}nd|j|f}|jd�}tjj|jd|�|_nxJdD]B}tj|�}|dkrw|d}nt|d||�qIWtjd|j	�|j�tjjdtjj|j	d��|j�tjd=ddl m!}|�}	|jj"�}
|j#|	dd|j	�}|j$||
|j%�|jj�rYt&�}nd}|jj'j(d||j)|
�f�tj*d|�tj+|�|j,s�t-|j	d|j.�ndS(Ntwin32s^distribution contains extensions and/or C libraries; must be compiled on a Windows 32 platformtbuildtinstalltreinit_subcommandsiitinstall_libs Should have already checked thisis.%s-%stlibtpurelibtplatlibtheadersR,tdatas/Include/$dist_nametinstall_sinstalling to %stPURELIBi����(tmktemptziptroot_dirtanyRsremoving temporary file '%s'tdry_run(R7R8R9R,R:(/tsystplatformR$R+thas_c_librariesRRtrun_commandtreinitialize_commandRtroottwarn_dirRtcompiletoptimizeRtAssertionErrortversionR&R(R)R*t
build_baset	build_libtstringtuppertsetattrRtinfotensure_finalizedtinserttrunttempfileR=tget_fullnametmake_archivet
create_exeRRt
dist_filestappendtget_installer_filenametdebugtremoveRRRA(
RR3R5Rtplat_specifierR2tkeytvalueR=tarchive_basenametfullnametarcnamet	pyversion((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyRU{sf					


%

	
	cCs�g}|jj}|jd�|jp+dd}d�}x�ddddd	d
ddgD]a}t||d�}|rZ|d
tj|�||�f}|jd|||�f�qZqZW|jd�|jr�|jd|j�n|jd||��|jd|j�|jd|j	�|j
rM|jd|j
�n|jrm|jd|j�n|jp�|jj
�}|jd||��ddl}ddl}	d|j|j��|	jf}
|jd|
�tj|d�S(Ns
[metadata]R"s
cSstj|dd�S(Ns
s\n(ROtreplace(ts((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pytescape�stauthortauthor_emailtdescriptiont
maintainertmaintainer_emailtnameturlRLs
    %s: %ss%s=%ss
[Setup]sinstall_script=%ssinfo=%sstarget_compile=%dstarget_optimize=%dstarget_version=%ssuser_access_control=%sstitle=%si����sBuilt %s with distutils-%ss
build_info=%s(R$tmetadataR[tlong_descriptiontgetattrROt
capitalizeRRRRRRRWttimet	distutilstctimet__version__R*(RtlinesRpRRRhRnR:RRtRut
build_info((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pytget_inidata�s<
	$
			cCs�ddl}|j|j�|j�}|j|�}|jd|�|rrt|d�j�}t|�}nd}t|d�}	|	j	|j
��|r�|	j	|�nytWntk
r�n"Xt
|t�r�|jd�}n|d}|jr)t|jd�j�}
||
d	}n
|d}|	j	|�|jd
dt|�|�}|	j	|�|	j	t|d�j��dS(Ni����screating %strbitwbtmbcsstrs
s<iiii{V4(tstructtmkpathRRzR\tannouncetopentreadtlentwritet
get_exe_bytestunicodet	NameErrort
isinstancetencodeRtpack(RRdRcRRtcfgdatatinstaller_namet
bitmapdatat	bitmaplentfiletscript_datatheader((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyRY�s>

	

			
cCs`|jr7tjj|jd||j|jf�}n%tjj|jd||jf�}|S(Ns%s.%s-py%s.exes	%s.%s.exe(RR(R)R*RR(RRcR�((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyR\6s	c	Cs?ddlm}t�}|jrm|j|krm|j|krL|�}qv|jdkrdd}qvd}n	|�}tjjt�}|jdkr�|jd dkr�|jd}nd	}tjj	|d
||f�}yt
|d�}Wn*tk
r}tt
|�d|�nXz|j�SWd|j�XdS(
Ni����(tget_build_versions2.4g@gffffff@R1itwinR"swininst-%.1f%s.exeR{s), %s not included in the Debian packages.(tdistutils.msvccompilerR�RRR(R)tdirnamet__file__RR*R�tIOErrorRtstrR�tclose(	RR�tcur_versiontbvt	directorytsfixtfilenametftmsg((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyR�Ds*					"N(s
bdist-dir=Ns1temporary directory for creating the distribution(sno-target-compileRs/do not compile .py to .pyc on the target system(sno-target-optimizeRs;do not compile .py to .pyo (optimized) on the target system(s	dist-dir=R
s-directory to put final built distributions in(sbitmap=Rs>bitmap to use for the installer instead of python-powered logo(stitle=Rs?title to display on the installer background instead of default(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(sinstall-script=NsUbasename of installation script to be run after installation or before deinstallation(spre-install-script=Ns{Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution(suser-access-control=Ns�specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC(t__name__t
__module__RkRRtuser_optionstboolean_optionsRR0RURzRYR\R�(((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyRsN
					(	S	17	(t__doc__t__revision__RBR(ROt	sysconfigRtdistutils.coreRtdistutils.dir_utilRtdistutils.errorsRRRRuRtdistutils.utilRR(((s5/usr/lib/python2.7/distutils/command/bdist_wininst.pyt<module>s