XylotrechusZ
a
��ReQ � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZzd dlmZ W n ey^ d dl mZ Y n0 ddl
mZ ddlm
Z
mZmZmZmZmZ ddlmZmZ e�e�ZdZdZG d d
� d
e�ZdS )� N)�Thread� )�DistlibException)�HTTPBasicAuthHandler�Request�HTTPPasswordMgr�urlparse�build_opener�string_types)�zip_dir�ServerProxyzhttps://pypi.org/pypi�pypic @ s� e Zd ZdZdZd*dd�Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zd+dd�Zd,dd�Z
d-dd�Zd.dd�Zdd� Zd/dd�Zd0d d!�Zd1d"d#�Zd$d%� Zd&d'� Zd2d(d)�ZdS )3�PackageIndexzc
This class represents a package index compatible with PyPI, the Python
Package Index.
s. ----------ThIs_Is_tHe_distlib_index_bouNdaRY_$Nc
C s� |pt | _| �� t| j�\}}}}}}|s<|s<|s<|dvrJtd| j ��d| _d| _d| _d| _t t
jd��Z}dD ]D} z,tj
| dg||d�}
|
dkr�| | _W q�W qt ty� Y qt0 qtW d � n1 s�0 Y dS ) z�
Initialise an instance.
:param url: The URL of the index. If not specified, the URL for PyPI is
used.
)�http�httpszinvalid repository: %sN�w)�gpgZgpg2z --version��stdout�stderrr )�
DEFAULT_INDEX�url�read_configurationr r �password_handler�ssl_verifierr �gpg_home�open�os�devnull�
subprocess�
check_call�OSError)�selfr �scheme�netloc�path�params�query�fragZsink�s�rc� r+ ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/distlib/index.py�__init__$ s(
�
zPackageIndex.__init__c C s ddl m} |� S )zs
Get the distutils command for interacting with PyPI configurations.
:return: the command.
r )�_get_pypirc_command)�utilr. )r"