zk//: d Z ddlmZ ddlZddlZddlZddlZddlZddl m Z mZmZ ddl mZmZ ddlmZmZmZ ddlmZ ddlmZmZ dd lmZmZmZmZmZmZm Z m!Z! dd l"m#Z#m$Z$m%Z%m&Z& dgZ' ej( e) Z*e+ee, ee, f Z-d&dZ. d'd(dZ/d)dZ0 G d de1 Z2 G d de1 Z3 ed G d d! Z4 G d" d# Z5 e5 Z6 G d$ d% Z7dS )*z)Handles all VCS (version control) support )annotationsN)IterableIteratorMapping) dataclassfield)AnyLiteralOptional)SpinnerInterface) BadCommandInstallationError) HiddenTextask_path_exists backup_dirdisplay_pathhide_url hide_valueis_installable_dirrmtree)CommandArgscall_subprocessformat_command_argsmake_commandvcsnamestrreturnboolc x t j | j }|sdS |g dt j z v S )z3 Return true if the name looks like a URL. F)httphttpsfileftp)urllibparseurlsplitschemer all_schemes)r r( s /builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/vcs/versioncontrol.pyis_urlr+ - sB \ " "4 ( ( /F u555GGG repo_urlrevproject_namesubdir str | Nonec t j |d }| dd }| d| d| }|r|d| z }|S )z Return the URL for a VCS requirement. Args: repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+"). project_name: the (unescaped) project name. /-_@z#egg=z&subdirectory=)r% r&