HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //opt/osm/venv/lib/python3.10/site-packages/pip/_internal/commands/__pycache__/lock.cpython-310.pyc
o

5i��@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZmZdd	lmZdd
lmZddlmZddlmZee�ZGd
d�de
�ZdS)�N)�Values)�Path)�
WheelCache)�
cmdoptions)�RequirementCommand�with_cleanup)�SUCCESS)�Pylock�is_valid_pylock_file_name)�get_build_tracker)�	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�constraintsZbuild_constraints�no_deps�pre�editable�src�ignore_requires_python�no_build_isolation�
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�r1�I/opt/osm/venv/lib/python3.10/site-packages/pip/_internal/commands/lock.py�add_options-sD���zLockCommand.add_options�options�argsc
CsPt�dt��t�d�t�|�|�|�}|j|||jd�}|�	t
��}t|jddd�}|�
||||�}t|j�}|D]}	d|	_q=|j|||||d|jd�}
|j|
|||dd|jd	d
�}|�|�|j|dd�}|jdkrtt��}
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.)r4�sessionr!�installT)�delete�kind�globally_managedF)�temp_build_dirr4�
build_trackerr6�finder�
use_user_site�	verbosityzto-satisfy-only)�preparerr=r4�wheel_cacher>�ignore_installedr!�upgrade_strategy)�check_supported_wheels�-z!%s is not a valid lock file name.)�base_dirzutf-8)�encoding)%�logger�verboser
�warningrZcheck_build_constraints�get_default_session�_build_package_finderr!�
enter_contextrr�no_clean�get_requirementsr�	cache_dir�permit_editable_wheels�make_requirement_preparerr?�
make_resolver�trace_basic_info�resolverr�cwdr
�parentr	Zfrom_install_requirementsr�valuesZas_toml�sys�stdout�write�
write_textr)r/r4r5r6r=r<�	directory�reqsrA�reqr@�resolver�requirement_setrFZoutput_file_pathZpylock_tomlr1r1r2�runXsz�

��
�	�



�
��
�zLockCommand.run)rN)�__name__�
__module__�__qualname__�__doc__�usager3rr�list�str�intrbr1r1r1r2rs
+ r)rY�optparser�pathlibr�pip._internal.cacher�pip._internal.clir�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesrZpip._internal.models.pylockr	r
�,pip._internal.operations.build.build_trackerr�pip._internal.utils.loggingr�pip._internal.utils.miscr
�pip._internal.utils.temp_dirrrcrHrr1r1r1r2�<module>s