????

Your IP : 18.222.193.130


Current Path : /lib/python3.10/distutils/command/__pycache__/
Upload File :
Current File : //lib/python3.10/distutils/command/__pycache__/bdist_msi.cpython-310.pyc

o

��bc���@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZddlZdd
lmZmZmZddlmZmZmZmZGdd
�d
e�ZGdd�de�ZdS)z#
Implements the bdist_msi command.
�N)�Command)�remove_tree)�get_python_version)�
StrictVersion)�DistutilsOptionError)�get_platform)�log)�schema�sequence�text)�	Directory�Feature�Dialog�add_datac@sFeZdZdZdd�Zdd�Zddd	�Zddd�Zddd�Zdd�Z	dS)�PyDialogz�Dialog class with a fixed layout: controls at the top, then a ruler,
    then a list of buttons: back, next, cancel. Optionally a bitmap at the
    left.cOs@tj|g|�R�|jd}d|d}|�dd||jd�dS)zbDialog(database, name, x, y, w, h, attributes, title, first,
        default, cancel, bitmap=true)�$�iH�
BottomLinerN)r�__init__�h�line�w)�self�args�kw�ruler�bmwidth�r�2/usr/lib/python3.10/distutils/command/bdist_msi.pyrs
zPyDialog.__init__c
Cs|�ddddddd|�dS)	z,Set the title text of the dialog at the top.�Title��
�@�<�z{\VerdanaBold10}%sN)r)r�titlerrrr%#s�zPyDialog.title�Back�c
C�,|rd}nd}|�|d|jddd|||�S)z�Add a back button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associated�r'���8���
pushbuttonr�rr%�next�name�active�flagsrrr�back*�z
PyDialog.back�Cancelc
Cr()z�Add a cancel button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr)r'i0r+r,r-r.r0rrr�cancel5r6zPyDialog.cancel�Nextc
Cr()z�Add a Next button with a given title, the tab-next button,
        its name in the Control table, possibly initially disabled.

        Return the button, so that events can be associatedr)r'��r+r,r-r.r0rrrr1@r6z
PyDialog.nextc
Cs,|�|t|j|d�|jdddd||�S)z�Add a button with a given title, the tab-next button,
        its name in the Control table, giving its x position; the
        y-position is aligned with the other buttons.

        Return the button, so that events can be associated�r+r,r-r))r/�intrr)rr2r%r1�xposrrr�xbuttonKs,zPyDialog.xbuttonN)r&r')r7r')r9r')
�__name__�
__module__�__qualname__�__doc__rr%r5r8r1r>rrrrrs



rc
s�eZdZdZdddde�fdddd	d
ddd
g
Zgd�Zgd�ZdZ�fdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd �Zd!d"�Z�ZS)#�	bdist_msiz7create a Microsoft Installer (.msi) binary distribution)z
bdist-dir=Nz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)ztarget-version=Nz6require a specific python version on the target system)�no-target-compile�cz/do not compile .py to .pyc on the target system)�no-target-optimize�oz;do not compile .py to .pyo (optimized) on the target system)z	dist-dir=�dz-directory to put final built distributions in)�
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)rErGrIrL)z2.0z2.1z2.2z2.3z2.4z2.5z2.6z2.7z2.8z2.9z3.0z3.1z3.2z3.3z3.4z3.5z3.6z3.7z3.8z3.9�Xcs$t�j|i|��t�dtd�dS)NzZbdist_msi command is deprecated since Python 3.9, use bdist_wheel (wheel packages) instead�)�superr�warnings�warn�DeprecationWarning)rrr��	__class__rrr}s�zbdist_msi.__init__cCsFd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
dS)Nr)�	bdist_dir�	plat_name�	keep_temp�no_target_compile�no_target_optimize�target_version�dist_dir�
skip_build�install_script�pre_install_script�versions)rrrr�initialize_options�s
zbdist_msi.initialize_optionscCs�|�dd�|jdur|�d�j}tj�|d�|_t�}|js'|j	�
�r'||_|jrD|jg|_|jsC|j	�
�rC|j|krCt
d|f��nt|j�|_|�ddd�|jrXt
d��|jrt|j	jD]
}|jtj�|�krlnq_t
d|j��d|_dS)	N�bdist)r\r\�msizMtarget version can only be %s, or the '--skip-build' option must be specified)r[r[)rVrVz5the pre-install-script feature is not yet implementedz(install_script '%s' not found in scripts)�set_undefined_optionsrU�get_finalized_command�
bdist_base�os�path�joinrrZ�distribution�has_ext_modulesr_r\r�list�all_versionsr^r]�scripts�basename�install_script_key)rre�
short_version�scriptrrr�finalize_options�sJ


��������
zbdist_msi.finalize_optionscCs~|js|�d�|jddd�}|j|_|j|_d|_|�d�}d|_d|_|j�	�rV|j
}|s?|js6Jd��dtjdd	�}d
|j
|f}|�d�}tj�|jd|�|_t�d|j�|��tj�dtj�|jd
��|��tjd=|�|j�|j��}|�|�}tj�|�}tj�|�r�t�|�|jj }|j!}	|	s�|j"}	|	s�d}	|�#�}
dt$|
�j%}|j��}|j
r�d|j
|f}nd|}t&�'|t(|t&�)�||	�|_*t&�+|j*t,�d|
fg}
|j-p�|j.}|r�|
�/d|f�|j0r�|
�/d|j0f�|
�rt1|j*d|
�|�2�|�3�|�4�|�5�|j*�6�t7|jd��r/d|j
�p%d|f}|jj8�/|�|j9�s=t:|j|j;d�dSdS)N�build�installr')�reinit_subcommandsr�install_libz Should have already checked thisz%d.%drNz.%s-%s�libzinstalling to %s�PURELIB�UNKNOWNz%d.%d.%dzPython %s %sz	Python %s�DistVersion�
ARPCONTACT�ARPURLINFOABOUT�Property�
dist_filesrC�any)�dry_run)<r\�run_command�reinitialize_commandrU�prefix�warn_dir�compile�optimizerirjrZ�sys�version_inforVrdrfrgrh�
build_base�	build_libr�info�ensure_finalized�insert�run�mkpathr[�get_fullname�get_installer_filename�abspath�exists�unlink�metadata�author�
maintainer�get_versionr�version�msilib�
init_databaser	�gen_uuid�db�
add_tablesr
�author_email�maintainer_email�append�urlr�add_find_python�	add_files�add_scripts�add_ui�Commit�hasattrr~rWrr�)rrtrvrZ�plat_specifierrs�fullname�installer_namer�r�r��sversion�product_name�props�email�tuprrrr��s�




�


�

�z
bdist_msi.runc
Cs|j}t�d�}tj�|j�}t||d|dd�}t|ddddddd�}||d	fg}|j	|j
gD]:}d|}d|}	}
d}||j
urHd
}d}
nd|}d}
t||	||d|
|d�}t||||||
�}|�|||f�q0|��i}|D]�\}}}|g}|r�|�
�}t�|j�D]m}tj�|j|�}tj�|�r�d
|�|�|f}||}
t|||||
|�}|�|�q�|js�|�|j|d�||vr�|�|�}||<||jkr�|jr�td|��d||_q�||}t|jd|||j|d|jfg�q�|s}|��qs|�|�dS)N�	distfiles�	TARGETDIR�	SourceDir�Python�
Everythingrr')�	directory�zPython from another locationrNzPython %s from registryz%s|%szMultiple files with name %sz[#%s]�
DuplicateFile)r�r��CABrfrgr�rUrr
r_�
other_versionr�r��pop�listdir�absoluterh�isdir�
make_short�	component�start_component�logical�add_filer]rorr�commit)rr��cab�rootdir�root�f�itemsr��targetr2�default�descr%�level�dir�seen�feature�todo�file�afile�short�newdir�keyrrrr�sf

�

�
���
zbdist_msi.add_filescCs�d}|jD]�}d|}d|}d|}d|}d|}d|}d|}	d	|}
d
|}d|}tjr5d}
nd
}
t|jd|d
|d|
f|d|d|
fg�t|jd||f||fg�t|jd|d|d|df|	d|d|df|
d|d|dfg�t|jd|||f|	||df|
d|d
fg�t|jd|||f|	||df|
d|d
fg�t|jdd|dd|fg�|d7}|dks�J�qdS)asAdds code to the installer to compute the location of Python.

        Properties PYTHON.MACHINE.X.Y and PYTHON.USER.X.Y will be set from the
        registry for each version of Python.

        Properties TARGETDIRX.Y will be set from PYTHON.USER.X.Y if defined,
        else from PYTHON.MACHINE.X.Y.

        Properties PYTHONX.Y will be set to TARGETDIRX.Y\python.exei�z)SOFTWARE\Python\PythonCore\%s\InstallPathzpython.machine.zpython.user.zPYTHON.MACHINE.zPYTHON.USER.�PythonFromMachine�PythonFromUser�	PythonExer��PYTHON�rN�
RegLocatorNr'�	AppSearch�CustomActioni3�[�]z]\python.exe�InstallExecuteSequence�InstallUISequence�	Conditionr�rz
NOT TARGETDIR�i�)r_r��Win64rr�)r�start�ver�install_path�machine_reg�user_reg�machine_prop�	user_prop�machine_action�user_action�
exe_action�target_dir_prop�exe_prop�Typerrrr�Isb
������������zbdist_msi.add_find_pythonc	Cs.|jr5d}|j|jgD](}d|}d|}t|jd|d||jfg�t|jd|d||fg�|d7}q|jr�tj�	|j
d	�}t|d
��)}|�d�t|j��}|�|�
��Wd�n1sbwYWd�n1sqwYt|jdd
t�|�fg�t|jddg�t|jddg�dSdS)Ni�zinstall_script.r�r��2r�z&Python%s=3r'zpreinstall.batrzrem ="""
%1 %0
exit
"""
�Binary�
PreInstall)r�rNr�N)r�z
NOT Installedi�)r]r_r�rr�ror^rfrgrhrU�open�write�readr�r�)rr�r��install_actionr��scriptfnr��finrrrr�s>��

	�������zbdist_msi.add_scriptscCs�
|j}d}}d}d}d}d}d}d}	t|dgd	��t|d
gd��t|dgd
��t|dtj�t|dtj�t|d||||||ddd�}
|
�d�|
jdddd�|
jdddd�|
�ddddddd�|
�ddd dd!dd"�|
j	dddd#�}|�
d$d%�t|d&||||||ddd�}|�d'�|jdddd�|jdddd�|�ddddddd(�|�ddd dd!dd"�|j	dddd#�}|�
d$d%�t|d)||||||ddd�}
|
�d*�|
jdddd�|
jdddd�|
�d+dd,dd!dd"�|
j	dddd#�}|�
d$d-�t|d.||||d/|d0d0d0d1d2�}|�d3dd4d5ddd6�|�d+d!d7d8d!dd9�|�d:d!d;d<ddd=�|�d>d?d!d@d<dAdBdCddd�|jd%dDd%d#�}|�
d$d%�|j	dDd0dDd#�}|�
d$dD�|jd0d%d0d#�}|�
d$d0�t|dEddFd<dGdH|dIdd�}|�dIddJd8dKddL�|�
dMdNdOdPdQddRd��
d$dS�|�
dTdUdOdPdQddVd��
d$dW�|�
dXddOdPdQddYd��
d$dZ�|�
d[d\dOdPdQddd��
d$d]�|�
d^dPdOdPdQddDd��
d$d_�|�
d`dadOdPdQddbd��
d$dc�|�
dddedOdPdQdd0d��
d$df�t|dgddFdhdid|dRdRdR�}|�d:dKddjdkddl�|�
dVdOdmdndoddVdR�}|�
d$d%�|�
dRdpdmdndoddRdV�}|�
d$d-�t|dqddFdhdi||d-d-d-�}|�d:dKddjdkddr�|�
d-dsdmdndodd-d�}|�
d$d%�t|dt||||||ddd�}|�d+dddduddv�|�dw�|�dddxdd!ddy�}|�dd:�|�dzdd{ddkdd�}|�dzd:�|jdddd�|j	d|ddd�|�dd�}|�
d}dg�t|d~||||||d|d|d�}|�d�|�d�ddkdd!dd�|j���|jdddd�|�	d�d�}d}|j
d�d�|d��|j|jgD]}|d7}|j
d�d�|d�||d���q�|j
d�dq|dd��|j
d$d-|d�d��|�dd��}|�
d}dg�|�d�d�dd�ddNdd�dd�d�}|�
d�d��|j}d�|}d�|}|�d�dd5dddd��}|�d�|�|�d�|�|�d�|�|�d�|�|�d�d�dd�dd�dd�|dd|d�}|�d�|�|�d�|�|�d�|�|�d�|�t|d�||||||d�d�d�d1d2�}|�d3dd4d5ddd��|�d+d!d!d8d!dd��|�d:d!d�d<d�dd��|�d�d�d!d�d<d�d�dd�dd�|�d�dbdd���
d$d-�t|d�||||||d�d|d�}|�d��|�d�dd�dhddd�dLd|�	}|�d�dd�d�d!d��|�d�dd�d�d!d��|jdddd�|�	d�d�}|�
d�d�d�d�|j
d$d-d�d��|�dd��}|�
d}dg�t|d�||||||dddd1d2�}|�d3d!dd5ddd��|�d:d�d�ddkdd��|�d�d�d�d�d!dd��|�ddd�|dd!ddy�}|�dd:�|�d�d�d�dNddFd�dd�dd�}|�d�d��|jdd|d1d�|j	d�dd1d�|�dd��
d}dg�t|d�||||||d|d|d�}|�d��|�d�dd�d<d\ddġ|�d�dd�d<d�dd�dLd|�	}|�d�dd�d5dodʡ|�d�dd�d5dod͡|jddd1d�|�	dd�}|�
d�d�d�d��|�
d�d�d�d4�|�
d�d�d�dB�|�
d�d�d�dա|�
d�d�d�dء|�
d�d�d�dڡ|�
d�d�d�dܡ|�
d�d�d�dݡ|�
d$d-d�d!�|�ddš�
d}dg�dS)�Nr�iri,z[ProductName] Setupr)r'� r}))�
DefaultUIFont�DlgFont8)�ErrorDialog�ErrorDlg)�	Progress1�Install)�	Progress2�installs)�MaintenanceForm_Action�Repair)�
WhichUsers�ALL�	TextStyle))r��Tahoma�	Nr)�DlgFontBold8r
�Nr')�
VerdanaBold10�Verdanar!Nr')�VerdanaRed9rr�rr�))�
PrepareDlgz(Not Privileged or Windows9x or Installed�)�
WhichUsersDlgz.Privileged and not Windows9x and not Installed�)�SelectFeaturesDlgz
Not Installedi�)�MaintenanceTypeDlgz,Installed AND NOT RESUME AND NOT Preselectedi�)�ProgressDlgNi�
ActionText�UIText�
FatalError�Finishz)[ProductName] Installer ended prematurelyz< Backr)r3r7r&�Description1r �Fr"�Pr$z�[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.�Description2��z.Click the Finish button to exit the Installer.)r2�	EndDialog�Exit�UserExitz'[ProductName] Installer was interruptedz�[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.�
ExitDialogz&Completing the [ProductName] Installer�Description���Return�
FilesInUse��RetryF)�bitmapr���z{\DlgFontBold8}Files in Use�iz8Some files that need to be updated are currently in use.�Text�7iJz�The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.�List�ListBox�k���FileInUseProcess�Ignorerr!�ei�	ErrorTextr�0r��N�x�H�Q��No�ErrorNo�Y���Yes�ErrorYes�A�Abort�
ErrorAbort�C�*�ErrorCancel�I�ErrorIgnore�O��Ok�ErrorOk�R���
ErrorRetry�	CancelDlgi�U���z;Are you sure you want to cancel [ProductName] installation?�9r,r-��WaitForCostingDlgzRPlease wait while the installer finishes determining your disk space requirements.�fr�(zOPlease wait while the Installer prepares to guide you through the installation.z&Welcome to the [ProductName] Installer�nzPondering...�
ActionData�r9�SpawnDialogrzSelect Python Installations�Hintz9Select the Python locations where %s should be installed.zNext >z[TARGETDIR]z[SourceDir])�orderingz
[TARGETDIR%s]z FEATURE_SELECTED AND &Python%s=3�SpawnWaitDialogrN�Features�
SelectionTreer#�FEATURE�PathEditz[FEATURE_SELECTED]�1z!FEATURE_SELECTED AND &Python%s<>3�Otherz$Provide an alternate Python location�Enable�Show�Disable�Hide���r��DiskCostDlg�OKz&{\DlgFontBold8}Disk Space RequirementszFThe disk space required for the installation of the selected features.�5aThe highlighted volumes (if any) do not have enough disk space available for the currently selected features.  You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).�
VolumeList�VolumeCostList�d�iz{120}{70}{70}{70}{70}g�?r�AdminInstallzGSelect whether to install [ProductName] for all users of this computer.rr�zInstall for all users�JUSTME�zInstall just for mez
[ALLUSERS]zWhichUsers="ALL"rz({\DlgFontBold8}[Progress1] [ProductName]�#�AzYPlease wait while the Installer [Progress2] [ProductName]. This may take several minutes.�StatusLabelzStatus:�ProgressBariz
Progress done�SetProgress�Progressrz)Welcome to the [ProductName] Setup Wizard�BodyText�?z:Select whether you want to repair or remove [ProductName].�RepairRadioGroup�lrrr�z&Repair [ProductName]�RemoverzRe&move [ProductName]z[REINSTALL]zMaintenanceForm_Action="Repair"z[Progress1]�	Repairingz[Progress2]�repairs�	Reinstallr
z[REMOVE]zMaintenanceForm_Action="Remove"��Removing��removes�
�z MaintenanceForm_Action<>"Change")r�rrrrrr%r5r8r1�event�controlrr/�mappingrir�r_r��	conditionr>�
radiogroup�add)rr��x�yrrr%�modal�modeless�track_disk_space�fatalrH�	user_exit�exit_dialog�inuse�errorr8�costing�prep�seldlg�orderr�r��install_other_cond�dont_install_other_cond�cost�
whichusers�g�progress�maintrrrr��s��
�	�
�
���
���
�������       ������
�
��
���������
�
������
��zbdist_msi.add_uicCs<|jr
d||j|jf}nd||jf}tj�|j|�}|S)Nz%s.%s-py%s.msiz	%s.%s.msi)rZrVrfrgrhr[)rr��	base_namer�rrrr��s�z bdist_msi.get_installer_filename)r?r@rA�descriptionr�user_options�boolean_optionsrlr�rr`rrr�r�r�r�r�r��
__classcell__rrrSrrCSs>���
([66&@rC)rBrfr�rP�distutils.corer�distutils.dir_utilr�distutils.sysconfigr�distutils.versionr�distutils.errorsr�distutils.utilr�	distutilsrr�r	r
rrr
rrrrCrrrr�<module>s >

Page not found | The NCLEX Doctor

Page not found!

Sorry, this page is not available...