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: //usr/lib/python3.9/site-packages/pip/_internal/commands/__pycache__/install.cpython-39.pyc
a

?�f7p�@sddlmZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZmZddlmZmZddlmZmZdd
lm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;e6�r�ddl
m<Z<ddl=m>Z>m?Z?m@Z@ddlAmBZBddl!mCZCddlDmEZEddl9mFZFe�GeH�ZIdd �ZJGd!d"�d"e�ZKd.d$d%�ZLd&d'�ZMd/d(d)�ZNd*d+�ZOd,d-�ZPdS)0�)�absolute_importN)�path)�
SUPPRESS_HELP)�
pkg_resources)�canonicalize_name)�
WheelCache)�
cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�ERROR�SUCCESS)�CommandError�InstallationError��distutils_scheme)�check_install_conflicts)�install_given_reqs)�get_requirement_tracker)�today_is_later_than)�parse_distutils_args��test_writable_dir)�
ensure_dir�get_installed_version�get_pip_version�(protect_pip_from_modification_on_windows�write_output)�
TempDirectory)�MYPY_CHECK_RUNNING)�virtualenv_no_global)�build� should_build_for_install_command)�Values)�Iterable�List�Optional)�
FormatControl)�ConflictDetails)�InstallRequirement)�BinaryAllowedPredicatecs�fdd�}|S)Ncs&|jr
dSt|j�}��|�}d|vS)NTZbinary)�
use_pep517r�nameZget_allowed_formats)�reqZcanonical_nameZallowed_formats��format_control��B/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py�check_binary_allowed8s


z6get_check_binary_allowed.<locals>.check_binary_allowedr0)r/r2r0r.r1�get_check_binary_allowed6sr3c@s@eZdZdZdZdd�Zedd��Zdd�Zd	d
�Z	dd�Z
d
S)�InstallCommandaI
    Install packages from:

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

    pip also supports installing from "requirements files", which provide
    an easy way to specify a whole environment to be installed.
    a%
      %prog [options] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] [-e] <vcs project url> ...
      %prog [options] [-e] <local project path> ...
      %prog [options] <archive url/path> ...cCsz|j�t���|j�t���|j�t���|j�t���|j�t���|jjddddddd�t�|j�|jjddd	d
d�|jjddd
t	d�|jjdddddd�|jjdddddd�|j�t�
��|j�t���|jjdddd	dd�|jjdddddgdd�|jjddd	d d�|jjd!d"d#d	d$d�|j�t���|j�t�
��|j�t���|j�t���|j�t���|j�t���|jjd%d	d&d'd(d)�|jjd*d
d&d+d,�|jjd-d
d.d'd/d)�|jjd0d
d1d'd2d)�|j�t���|j�t���|j�t���|j�t���|j�t���t�tj|j�}|j�d3|�|j�d3|j�dS)4Nz-tz--target�
target_dir�dirz�Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.)�dest�metavar�default�helpz--user�
use_user_site�
store_truez�Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r7�actionr:z	--no-userZstore_falsez--root�	root_pathz=Install everything relative to this alternate root directory.z--prefix�prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-Uz	--upgrade�upgradez�Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategy�upgrade_strategyzonly-if-neededZeageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" -  are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r7r9�choicesr:z--force-reinstall�force_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installed�ignore_installedz�Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z	--compile�compileTz'Compile Python source files to bytecode)r=r7r9r:z--no-compilez.Do not compile Python source files to bytecode)r=r7r:z--no-warn-script-location�warn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflicts�warn_about_conflictsz%Do not warn about broken dependenciesr)Zcmd_optsZ
add_optionr�requirements�constraintsZno_depsZpreZeditableZadd_target_python_optionsr�	build_dir�src�ignore_requires_pythonZno_build_isolationr+Z
no_use_pep517�install_options�global_optionsZ	no_binaryZonly_binaryZ
prefer_binaryZrequire_hashesZprogress_barZmake_option_groupZindex_group�parserZinsert_option_group)�selfZ
index_optsr0r0r1�add_optionsWs��
�����	���
�����zInstallCommand.add_optionsc+sx|jr|jdurtd��t�|�dd�}t��dkrx|�sx|jsxt�	t
jd�}|dkrjt�	t
j�d}t
�d|�d}|jr�|j}tj|d	d
�|jp�g}t
�dt��t|j|j|j|j|jd�|_d}d}|j�r4d	|_tj�|j�|_tj�|j��rtj�|j��std
��tdd�}|j}|�|�|j�p>g}	|�|�}
t |�}|j!||
||j"d�}|j#�pr|j$}
t%|j&|j'�}|�t(��}t|j$|
dd	d�}�zZ|�)||||
�}t*||j�|j+||||
||jd�}|j,|||||j|j|j"|j-||j.d�
}|�/|�|j0||jd�}z|�1d�}Wnt2�yDd}Yn0|j3du}t4|d�t5|j'���fdd�|j6�7�D�}t8||ggd�\}}dd�|D�}|�r�t9d�:d�;|����|D]}|j.�s�d|_<�q�|�=|�}d}|j>�o�|j?}|�r|�@|�}|jA}|j�rd}tB|||	|j||j||j|jCd �	} tD|j||j|j|jd!�}!tE�F|!�}"| jGtH�Id"�d#�g}#| D]P}$|$jJ}%z$tK|$jJ|"d$�}&|&�r�|%d%|&7}%WntL�y�Yn0|#�M|%��qr|du�r�|jN|d&|jOvd'�d(�;|#�}'|'�r�tPd)|'�WnPtQ�yN}(z6|jRd*k})tS|(|)|j�}*t
jT|*|)d+�tUWYd}(~(Sd}(~(00|j�rt|�sbJ�|�V|j||j�tWS),Nz'Can not combine '--user' and '--target'cSs ttd�pttd�otjtjkS)NZreal_prefix�base_prefix)�hasattr�sysrR�prefixr0r0r0r1�is_venv�s


�z#InstallCommand.run.<locals>.is_venvrz__main__.pyz -m pipzgRunning pip install with root privileges is generally not a good idea. Try `%s install --user` instead.zto-satisfy-onlyT)Zcheck_targetzUsing %s)r?r5r>�
isolated_modez=Target path exists but is not a directory, will not continue.�target)�kind)�options�session�
target_pythonrLZinstall)�deleterYZglobally_managed)Ztemp_build_dirrZ�req_trackerr[�finderr;)
�preparerr_rZ�wheel_cacher;rDrLrCrAr+)Zcheck_supported_wheelsZpipF)�
modifying_pipcsg|]}t|��r|�qSr0)r"��.0�r�r2r0r1�
<listcomp>js
��z&InstallCommand.run.<locals>.<listcomp>)raZ
build_optionsrNcSsg|]}|jr|j�qSr0)r+r,rcr0r0r1rgzs�zPCould not build wheels for {} which use PEP 517 and cannot be installed directlyz, i� )�root�homerUrFr;Z	pycompile)�userrirhrU�isolatedr,)�key)�working_set�-z
2020-resolver)�new_resolver� zSuccessfully installed %s�)�exc_info)Xr;r5rrZcheck_install_build_global�os�getuidr>r�basenamerT�argv�
executable�logger�warningr@rAZcheck_dist_restrictionrM�debugr�decide_user_installr?rWrD�abspath�exists�isdirr�
enter_contextrNZget_default_sessionr	Z_build_package_finderrLZno_cleanrJrZ	cache_dirr/rZget_requirements�'reject_location_related_install_optionsZmake_requirement_preparerZ
make_resolverrCr+Ztrace_basic_info�resolveZget_requirement�KeyErrorZsatisfied_byrr3rH�valuesr!r�format�joinZlegacy_install_reasonZget_installation_orderZignore_dependenciesrG�_determine_conflictsrFrrE�get_lib_location_guessesrZ
WorkingSet�sort�operator�
attrgetterr,r�	Exception�append�_warn_about_conflictsZfeatures_enabledr�EnvironmentError�	verbosity�create_env_error_message�errorr�_handle_target_dirr
)+rPrZ�argsrVZcommandrArM�target_temp_dirZtarget_temp_dir_pathrNr[r\r_Zbuild_deleterar^Z	directoryZreqsr`ZresolverZrequirement_setZpip_reqrbZ
reqs_to_build�_Zbuild_failuresZpep517_build_failure_namesre�
to_installZ	conflictsZshould_warn_about_conflictsrFZ	installedZ
lib_locationsrm�items�result�itemZinstalled_versionZinstalled_descr��show_traceback�messager0rfr1�run�st
��
���


�����
�

��
��
	���

�
�
��
�
�
�
�

�zInstallCommand.runcsTt|�g}td|jd�}|d}|d}|d}tj�|�rH|�|�tj�|�rf||krf|�|�tj�|�r||�|�|D]�}	t�|	�D]�}
|	|kr�tj�||
��t�fdd�|dd�D��r�q�tj�||
�}tj�|��r6|s�t	�
d	|�q�tj�|��rt	�
d
|�q�tj�|��r,t
�|�n
t�|�t
�tj�|	|
�|�q�q�dS)N�)ri�purelib�platlib�datac3s|]}|���VqdS�N)�
startswith)rd�s��ddirr0r1�	<genexpr>��z4InstallCommand._handle_target_dir.<locals>.<genexpr>���zKTarget directory %s already exists. Specify --upgrade to force replacement.z�Target directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)rrrrsr}r��listdirr��anyrxry�islinkr~�shutilZrmtree�removeZmove)rPr5r�r@Zlib_dir_list�schemeZpurelib_dirZplatlib_dirZdata_dirZlib_dirr�Ztarget_item_dirr0r�r1r��sN


��
�z!InstallCommand._handle_target_dircCs.z
t|�WSty(t�d�YdS0dS)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rr�rx�	exception)rPr�r0r0r1r�s
�z#InstallCommand._determine_conflictsc	Cs|\}\}}|s|sdSg}|s6|�d�|�d�n,tdddd�sb|�d�d}|�d	�|��|D]<}||d
}	||D]"}
dj||	|
dd
�}|�|�q~qf|D]B}||d
}	||D](\}}
}dj||	|||
d�}|�|�q�q�t�d�|��dS)Nz�After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
z|We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
i���)ZyearZmonthZdayz�Pip will install or upgrade your package(s) and its dependencies without taking into account other packages you already have installed. This may cause an uncaught dependency conflict.
z#https://forms.gle/cWKMoDs8sUVE29hz9zXIf you would like pip to take your other packages into account, please tell us here: {}
rz@{name} {version} requires {requirement}, which is not installed.rq)r,�version�requirementzh{name} {version} requires {requirement}, but you'll have {dep_name} {dep_version} which is incompatible.)r,r�r��dep_name�dep_version�
)r�rr�rxZcriticalr�)rPZconflict_detailsroZpackage_setZmissingZconflicting�partsZ	form_linkZproject_namer�Z
dependencyr�r�r�r-r0r0r1r�#sX���������
z$InstallCommand._warn_about_conflictsN)�__name__�
__module__�__qualname__�__doc__ZusagerQrr�r�r�r�r0r0r0r1r4Cs
y8r4FcCs$td|||||d�}|d|dgS)Nr�)rjrirhrkrUr�r�r)rjrirhrkrUr�r0r0r1r�cs
�r�cCstdd�tt||d��D��S)Ncss|]}t|�VqdSr�r)rd�dr0r0r1r�rsz)site_packages_writable.<locals>.<genexpr>�rhrk)�all�setr�r�r0r0r1�site_packages_writableps

��r�cCs�|dur|st�d�dS|rF|r*td��t�r8td��t�d�dS|dusRJ�|sZ|rht�d�dStjs|t�d	�dSt||d
�r�t�d�dSt�d�dS)
aZDetermine whether to do a user install based on the input options.

    If use_user_site is False, no additional checks are done.
    If use_user_site is True, it is checked for compatibility with other
    options.
    If use_user_site is None, the default behaviour depends on the environment,
    which is provided by the other arguments.
    Nz$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledr�z0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable)	rxrzrr r�site�ENABLE_USER_SITEr��info)r;r?r5r>rWr0r0r1r{xs4
��




r{cCs�dd�}g}|D]0}|j}t|�}|r|�d�||���|��q|rjt|�}|rj|�d�||�����|srdStd�d�|����dS)z�If any location-changing --install-option arguments were passed for
    requirements or on the command-line, then show a deprecation warning.
    cSsdd�|D�S)NcSsg|]}d�|�dd���qS)z--{}r�rn)r��replace)rdr,r0r0r1rg�r�zSreject_location_related_install_options.<locals>.format_options.<locals>.<listcomp>r0)Zoption_namesr0r0r1�format_options�sz?reject_location_related_install_options.<locals>.format_optionsz{!r} from {}z{!r} from command lineNz�Location-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.z; )rMrr�r��keysrr�)rHrZr�Z	offendersr�rMZlocation_optionsr0r0r1r��s4��
����r�cCs�g}|�d�|s,|�d�|�t|��n
|�d�|dd7<|jtjkr�d}d}|st|�|d|��g�n
|�|�|�d	�d
�|���dS)z{Format an error message for an EnvironmentError

    It may occur anytime during the execution of the install command.
    z5Could not install packages due to an EnvironmentErrorz: �.r�r�z"Consider using the `--user` optionzCheck the permissionsz or z.
r�)r��str�errnoZEACCES�extend�lowerr��strip)r�r�Zusing_user_siter�Zuser_option_partZpermissions_partr0r0r1r��s$


�

r�)FNNFN)NNNF)QZ
__future__rr�Zloggingr�rsr�r�rTrZoptparserZpip._vendorrZpip._vendor.packaging.utilsrZpip._internal.cacherZpip._internal.clirZpip._internal.cli.cmdoptionsr	Zpip._internal.cli.req_commandr
rZpip._internal.cli.status_codesrr
Zpip._internal.exceptionsrrZpip._internal.locationsrZpip._internal.operations.checkrZpip._internal.reqrZpip._internal.req.req_trackerrZpip._internal.utils.datetimerZ"pip._internal.utils.distutils_argsrZpip._internal.utils.filesystemrZpip._internal.utils.miscrrrrrZpip._internal.utils.temp_dirrZpip._internal.utils.typingrZpip._internal.utils.virtualenvr Zpip._internal.wheel_builderr!r"r#�typingr$r%r&Z#pip._internal.models.format_controlr'r(Zpip._internal.req.req_installr)r*Z	getLoggerr�rxr3r4r�r�r{r�r�r0r0r0r1�<module>sr

%�


�
<*