관리-도구
편집 파일: index.cpython-36.pyc
3 �Pf]R � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZyd dlmZ W n ek r` d dl mZ Y nX ddl mZ ddlm Z mZmZmZmZmZ ddlmZmZmZ eje�ZdZdZG d d � d e�ZdS )� N)�Thread� )�DistlibException)�HTTPBasicAuthHandler�Request�HTTPPasswordMgr�urlparse�build_opener�string_types)�cached_property�zip_dir�ServerProxyzhttps://pypi.python.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 | _| j� t| j�\}}}}}}|s<|s<|s<|dkrJtd| j ��d| _d| _d| _d| _d| _ t tjd��R}xJdD ]B} y(t j| dg||d �} | d kr�| | _P W q| tk r� Y q|X q|W W dQ R X 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�gpg�gpg2z --version)�stdout�stderrr )r r )r r )� DEFAULT_INDEX�url�read_configurationr r �password_handler�ssl_verifierr �gpg_home� rpc_proxy�open�os�devnull� subprocessZ check_call�OSError)�selfr �scheme�netloc�pathZparamsZqueryZfragZsink�s�rc� r) �/usr/lib/python3.6/index.py�__init__$ s( zPackageIndex.__init__c C s&