HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pip/_internal/commands/__pycache__/lock.cpython-310.pyc
o

��h�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZmZdd	lmZdd
lmZddlmZddlmZdd
lmZee�ZGdd�de
�ZdS)�N)�Values)�Path)�
WheelCache)�
cmdoptions)�RequirementCommand�with_cleanup)�SUCCESS)�Pylock�is_valid_pylock_file_name)�get_build_tracker)�check_legacy_setup_py_options)�	getLogger)�get_pip_version)�
TempDirectoryc@s<eZdZdZdZddd�Zededee	de
fd	d
��ZdS)�LockCommanda�
    EXPERIMENTAL - Lock packages and their dependencies from:

    - PyPI (and other indexes) using requirement specifiers.
    - VCS project urls.
    - Local project directories.
    - Local or remote source archives.

    pip also supports locking from "requirements files", which provide an easy
    way to specify a whole environment to be installed.

    The generated lock file is only guaranteed to be valid for the current
    python version and platform.
    z�
      %prog [options] [-e] <local project path> ...
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] <archive url/path> ...�returnNcCsb|j�tjdddddddd��|j�t���|j�t���|j�t���|j�t���|j�t���|j�t�	��|j�t�
��|j�t���|j�t���|j�t�
��|j�t���|j�t���|j�t���|j�t���|j�t���|j�t���|j�t���t�tj|j�}|j�d|�|j�d|j�dS)	Nz--outputz-o�output_file�pathzpylock.tomlz7Lock file name (default=pylock.toml). Use - for stdout.)�dest�metavar�type�default�helpr)�cmd_opts�
add_optionr�	PipOption�requirements�constraints�no_deps�pre�editable�src�ignore_requires_python�no_build_isolation�
use_pep517�
no_use_pep517�check_build_deps�config_settings�	no_binary�only_binary�
prefer_binary�require_hashes�progress_bar�make_option_group�index_group�parser�insert_option_group)�self�
index_opts�r3�F/usr/local/lib/python3.10/dist-packages/pip/_internal/commands/lock.py�add_options0sD���zLockCommand.add_options�options�argscCsTt�dt��t�d�|�|�}|j|||jd�}|�t��}t	|j
ddd�}|�||||�}t||�t
|j�}|D]}	d|	_q=|j|||||d|jd�}
|j|
|||dd|jd	|jd
�	}|�|�|j|dd�}|jdkrvt��}
nt|j�}t|�s�t�d
|�|j}
tj|j��|
d���}|jdkr�t j!�"|�t$S|j#|dd�t$S)NzUsing %szspip lock is currently an experimental command. It may be removed/changed in a future release without prior warning.)r6�sessionr"�installT)�delete�kind�globally_managedF)�temp_build_dirr6�
build_trackerr8�finder�
use_user_site�	verbosityzto-satisfy-only)	�preparerr?r6�wheel_cacher@�ignore_installedr"�upgrade_strategyr$)�check_supported_wheels�-z!%s is not a valid lock file name.)�base_dirzutf-8)�encoding)%�logger�verboser�warning�get_default_session�_build_package_finderr"�
enter_contextrr�no_clean�get_requirementsrr�	cache_dir�permit_editable_wheels�make_requirement_preparerrA�
make_resolverr$�trace_basic_info�resolverr�cwdr
�parentr	�from_install_requirementsr�values�as_toml�sys�stdout�write�
write_textr)r1r6r7r8r?r>�	directory�reqsrC�reqrB�resolver�requirement_setrH�output_file_path�pylock_tomlr3r3r4�run[s|�
��

�	�



�
��
�zLockCommand.run)rN)�__name__�
__module__�__qualname__�__doc__�usager5rr�list�str�intrhr3r3r3r4rs
+ r)r]�optparser�pathlibr�pip._internal.cacher�pip._internal.clir�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr�pip._internal.models.pylockr	r
�,pip._internal.operations.build.build_trackerr�pip._internal.req.req_installr�pip._internal.utils.loggingr
�pip._internal.utils.miscr�pip._internal.utils.temp_dirrrirJrr3r3r3r4�<module>s