HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/__pycache__/windows.cpython-310.pyc
o

�N�g�@sRdZddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZmZm
Z
ddlmZmZe�e�ZeeZejekrSddlZejjZe�e�d�d�d	d
�Zdd�Zejd
edd�Zejdedejdd�d�dd�Zejdedgd�ej ddd�Zejd
ed�ej ddd�Zejd
ed�ej dd d�Zejd
ed�dS)!z
The windows build process.
�N�)�runcmd�create_archive�
MODULE_DIR�builds�install_runtime�)�arches�WIN32i�����cCsd|d<dS)z�
    Make sure we have the correct environment variables set.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    �1ZMSBUILDDISABLENODEREUSEN�)�env�dirsr
r
�H/opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/windows.py�populate_envs	rc

Csldddd�}|d}||}t|jdd�d|d	g}t�d
�t||||d�t�d�|d
kr9|jd|}n|jd|}|jd}|jddd�dddddd|d�dd��d�dddg	}	|	D]}
tj	t||
�t||
�d�qc|jdjddd�t
�
t|d ��D]}tj	|t|jd�d�q�t
�
t|d!��D]}tj	|t|jd�d�q�tjt|jd"�t|jd"�dd#�d$|dvr�tjt|jd%d&�t|jd"�d�tjt|jd'�t|jd'�dd#�t
jt|jd'd(�dd)�|jd*jddd�tjt|d+�t|jd*d+�d�d|d�dd��d,�}tjt||�t|jd*|�d�d-S).a
    Run the commands to build Python.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    Zx64�win32�arm64)�amd64�x86rZRELENV_HOST_ARCHZPCbuildz	build.batz-pz--no-tkinterz
Start PCbuild�r�stderr�stdoutzPCbuild finishedr�ScriptsT)�parents�exist_okzpy.exezpyw.exe�
python.exezpythonw.exezpython3.dll�pythonZRELENV_PY_MAJOR_VERSION�.�z.dllzvcruntime140.dllzvenvlauncher.exezvenvwlauncher.exe)�src�dstZDLLs�*.pyd�*.dllZInclude)r r!�
dirs_exist_okz3.13ZPCz
pyconfig.h�Lib�
site-packages)rZlibszpython3.libz.libN)�str�source�log�infor�prefix�mkdir�replace�shutil�move�glob�copytree�copy�os�makedirs)
rr�logfpZarch_to_plat�arch�plat�cmdZ	build_dirZbin_dirZbinaries�binary�fileZpylibr
r
r�build_python's|��


� ���
�

�r;rz3.10.16)r�versionrzChttps://www.python.org/ftp/python/{version}/Python-{version}.tar.xzZ(401e6a504a956c8f0aab76c4f3ad9df601a83eb1)�urlr<�checksum)�
build_func�downloadcs|jdd}t|�|jdd�tt��ddg|��d���fdd	�}|d
�tjd��r7|tj�n|d�t�|j�D]\}}}|D]}|�	d
�rYt�
t�|�|�qHqAgd�}	|j�d�}
t
j|
dd��}t||j|	��Wd�dS1s�wYdS)a
    Finalize sitecustomize, relenv runtime, and pip for Windows.

    :param env: The environment dictionary
    :type env: dict
    :param dirs: The working directories
    :type dirs: ``relenv.build.common.Dirs``
    :param logfp: A handle for the log file
    :type logfp: file
    r%r&rr�-mZ	ensurepiprcsLtj��}d}t��dddt|�g}|r|�d�|��t||��d�dS)NrAZpip�installz--target={}r)r3�environr2r'�append�formatr)Zpkgr�targetr8�r5rr
r�runpip�s
�zfinalize.<locals>.runpipZwheelz.git�relenvz.pyc)z*.exez*.pyr"r#z*.libz
/Include/*z/Lib/site-packages/*z.tar.xzzw:xz)�modeN)r+rrr'r�parent�existsr3�walk�endswith�remove�pathlib�Path�tarfile�openr)rrr5�sitepackagesrH�root�_�filesr:Zglobs�archive�fpr
rGr�finalize�s(
��	"�rZzrelenv-finalize)r?Zwait_onz3.11.11Z(acf539109b024d3c5f1fc63d6e7f08cd294ba56d)r<r>)Zbuilderz3.12.9Z(465d8a664e63dc5aa1f0d90cd1d0000a970ee2fbz3.13.2Z(da39a3ee5e6b4b0d3255bfef95601890afd80709)!�__doc__r0r.�sysr3rPrR�logging�commonrrrrrr	r
�	getLogger�__name__r)ZARCHES�platform�ctypesZwindllZkernel32ZSetConsoleModeZGetStdHandlerr;�add�buildr<rZr2r
r
r
r�<module>sZ

^��>����