HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/__pycache__/__init__.cpython-310.pyc
o

�N�g%�@sxdZddlZddlZddlZddlZddlmZmZmZddl	m
Z
mZddl	mZdd	�Z
d
d�Zdd
�Zdd�ZdS)z
The ``relenv build`` command.
�N�)�linux�darwin�windows)�builds�CHECK_VERSIONS_SUPPORT�)�
build_archcCs.tjdkrtStjdkrtStjdkrtSdS)�:
    Return the right module based on `sys.platform`.
    rr�win32N)�sys�platformrrr�rr�I/opt/saltstack/salt/lib/python3.10/site-packages/relenv/build/__init__.py�platform_modules


�rcCsttjtj���S)r
)�listrrr
�keysrrrr�platform_versionssrcCs�t�}|jddd�}|jtd�|jdt�|jtdd�|jdd	d
dd�|jd
t�dt�tdd�|jdd	d
dd�|jdd	d
dd�|jddddgdd�|jdd	d
dd�|jdd	d
dd�|jddd d!d"�d#S)$z�
    Setup the subparser for the ``build`` command.

    :param subparsers: The subparsers object returned from ``add_subparsers``
    :type subparsers: argparse._SubParsersAction
    �buildz,Build Relenv Python Environments from source)�description)�funcz--archz,The host architecture [default: %(default)s])�default�choices�type�helpz--cleanF�
store_truezfClean up before running the build. This option will remove the logs, src, build, and previous tarball.)r�actionrz--pythonrz)The python version [default: %(default)s]z--no-cleanupz�By default the build directory is removed after the build tarball is created. Setting this option will leave the build directory in place.z--force-downloadz4Force downloading source tarballs even if they existz--step�stepsZSTEP�appendz�A step to run alone, can use multiple of this argument. When this option is used to invoke builds, depenencies of the steps are ignored.  This option should be used with care, as it's easy to request a situation that has no chance of being succesful. )�dest�metavarrrrz--check-versionsz@Check for new version of python and it's depenencies, then exit.z--no-prettyzELog build output to stdout instead of displaying a simplified status.z--log-level�warning)�errorr!�info�debugz2Log level determines how verbose the logs will be.)rrrN)	r�
add_parser�set_defaults�main�add_argumentr	ZARCHES�strr)Z
subparsers�modZbuild_subparserrrr�setup_parser$s~���	����
��
�r+c	Cs0t��t�d�tj���t_t�d�tj���t_tjt	j	vr-t
dtj���t�d�t	j	tj|j}|j
rStsDt
d�t�d�|�
�sNt�d�nt�d�|�|j�|j|jkrct
d�d}|jrpd	d
�|jD�}|jrvd}nd}d
d�}t�tj|�|||j|j|j|j||j��d�dS)z�
    The entrypoint to the ``build`` command.

    :param args: The arguments to the command
    :type args: ``argparse.Namespace``
    zutf-8zUnsupported platform: rz\Check versions not supported. Please install the packaging and looseversion python packages.rrzVWarning: Cross compilation support is experimental and is not fully tested or working!NcSsg|]}|���qSr)�strip)�.0�_rrr�
<listcomp>�szmain.<locals>.<listcomp>FTcSst�d�dS)Nr)r�exit)�signal�framerrr�signal_handler�szmain.<locals>.signal_handler)r�arch�cleanZcleanup�force_download�show_ui�	log_level)�random�seed�codecs�	getwriterr�stdout�detach�stderrr
r�printr0�pythonZcheck_versionsrZset_archr4r	rZ	no_prettyr1�SIGINTr5Z
no_cleanupr6r8�upper)�argsrrr7r3rrrr'sL
�

�
�r')�__doc__rr9r;r1�rrr�commonrrr	rrr+r'rrrr�<module>s[