<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
ž
7’ReL  c               @   s  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z y d  d l m Z Wn" e k
 r€ d  d l	 m Z Yn Xd d l
 m Z d d l m Z m Z m Z m Z m Z m Z d d l m Z m Z m Z e j e ƒ Z d Z d Z Gd	 d
 „  d
 e ƒ Z d S(   i    N(   u   Threadi   (   u   DistlibException(   u   HTTPBasicAuthHandleru   Requestu   HTTPPasswordMgru   urlparseu   build_openeru   string_types(   u   cached_propertyu   zip_diru   ServerProxyu   https://pypi.python.org/pypiu   pypic             B   s  |  Ee  Z d  Z d Z d Z d) d d „ Z d d „  Z d d „  Z d	 d
 „  Z	 d d „  Z
 d d „  Z d d „  Z d d „  Z d) d d „ Z d d „  Z d) d) d d d d „ Z d d „  Z d d „  Z d d  „  Z d) d) d! d" „ Z d# d$ „  Z d% d& „  Z d) d' d( „ Z d) S(*   u   PackageIndexuc   
    This class represents a package index compatible with PyPI, the Python
    Package Index.
    s.   ----------ThIs_Is_tHe_distlib_index_bouNdaRY_$c             C   s  | p	 t  |  _ |  j ƒ  t |  j ƒ \ } } } } } } | sX | sX | sX | d k rn t d |  j ƒ ‚ n  d |  _ d |  _ d |  _ d |  _	 d |  _
 t t j d ƒ k } xa d D]Y }	 y> t j |	 d g d | d	 | ƒ}
 |
 d
 k rú |	 |  _ Pn  Wq· t k
 rYq· Xq· WWd QXd S(   u”   
        Initialise an instance.

        :param url: The URL of the index. If not specified, the URL for PyPI is
                    used.
        u   httpu   httpsu   invalid repository: %su   wu   gpg2u   gpgu	   --versionu   stdoutu   stderri    N(   u   httpu   https(   u   gpg2u   gpg(   u   DEFAULT_INDEXu   urlu   read_configurationu   urlparseu   DistlibExceptionu   Noneu   password_handleru   ssl_verifieru   gpgu   gpg_homeu	   rpc_proxyu   openu   osu   devnullu
   subprocessu
   check_callu   OSError(   u   selfu   urlu   schemeu   netlocu   pathu   paramsu   queryu   fragu   sinku   su   rc(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   __init__$   s(    
!							u   PackageIndex.__init__c             C   s3   d d l  m } d d l m } | ƒ  } | | ƒ S(   us   
        Get the distutils command for interacting with PyPI configurations.
        :return: the command.
        i    (   u   Distribution(   u   PyPIRCCommand(   u   distutils.coreu   Distributionu   distutils.configu   PyPIRCCommand(   u   selfu   Distributionu   PyPIRCCommandu   d(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   _get_pypirc_command@   s    	u    PackageIndex._get_pypirc_commandc             C   sy   |  j  ƒ  } |  j | _ | j ƒ  } | j d ƒ |  _ | j d ƒ |  _ | j d d ƒ |  _ | j d |  j ƒ |  _ d S(   uç   
        Read the PyPI access configuration as supported by distutils, getting
        PyPI to do the acutal work. This populates ``username``, ``password``,
        ``realm`` and ``url`` attributes from the configuration.
        u   usernameu   passwordu   realmu   pypiu
   repositoryN(   u   _get_pypirc_commandu   urlu
   repositoryu   _read_pypircu   getu   usernameu   passwordu   realm(   u   selfu   cu   cfg(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   read_configurationJ   s    u   PackageIndex.read_configurationc             C   s0   |  j  ƒ  |  j ƒ  } | j |  j |  j ƒ d S(   uÍ   
        Save the PyPI access configuration. You must have set ``username`` and
        ``password`` attributes before calling this method.

        Again, distutils is used to do the actual work.
        N(   u   check_credentialsu   _get_pypirc_commandu   _store_pypircu   usernameu   password(   u   selfu   c(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   save_configurationY   s    
u   PackageIndex.save_configurationc             C   s‰   |  j  d k s |  j d k r- t d ƒ ‚ n  t ƒ  } t |  j ƒ \ } } } } } } | j |  j | |  j  |  j ƒ t	 | ƒ |  _
 d S(   up   
        Check that ``username`` and ``password`` have been set, and raise an
        exception if not.
        u!   username and password must be setN(   u   usernameu   Noneu   passwordu   DistlibExceptionu   HTTPPasswordMgru   urlparseu   urlu   add_passwordu   realmu   HTTPBasicAuthHandleru   password_handler(   u   selfu   pmu   _u   netloc(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   check_credentialse   s    	!u   PackageIndex.check_credentialsc             C   s€   |  j  ƒ  | j ƒ  | j ƒ  } d | d <|  j | j ƒ  g  ƒ } |  j | ƒ } d | d <|  j | j ƒ  g  ƒ } |  j | ƒ S(   uq  
        Register a distribution on PyPI, using the provided metadata.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the distribution to be
                         registered.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        u   verifyu   :actionu   submit(   u   check_credentialsu   validateu   todictu   encode_requestu   itemsu   send_request(   u   selfu   metadatau   du   requestu   response(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   registerq   s    




u   PackageIndex.registerc             C   sc   xR | j  ƒ  } | s Pn  | j d ƒ j ƒ  } | j | ƒ t j d | | f ƒ q | j ƒ  d S(   ur  
        Thread runner for reading lines of from a subprocess into a buffer.

        :param name: The logical name of the stream (used for logging only).
        :param stream: The stream to read from. This will typically a pipe
                       connected to the output stream of a subprocess.
        :param outbuf: The list to append the read lines to.
        u   utf-8u   %s: %sN(   u   readlineu   decodeu   rstripu   appendu   loggeru   debugu   close(   u   selfu   nameu   streamu   outbufu   s(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   _reader…   s    	u   PackageIndex._readerc             C   sÒ   |  j  d d d g } |  j r7 | j d |  j g ƒ n  | d k	 r\ | j d d d g ƒ n  t j ƒ  } t j j | t j j	 | ƒ d ƒ } | j d	 d
 d | d | | g ƒ t
 j d d j | ƒ ƒ | | f S(   u¯  
        Return a suitable command for signing a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The signing command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        u   --status-fdu   2u   --no-ttyu	   --homediru   --batchu   --passphrase-fdu   0u   .ascu   --detach-signu   --armoru   --local-useru   --outputu   invoking: %su    N(   u   gpgu   gpg_homeu   extendu   Noneu   tempfileu   mkdtempu   osu   pathu   joinu   basenameu   loggeru   debug(   u   selfu   filenameu   signeru   sign_passwordu   cmdu   tdu   sf(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   get_sign_command—   s    	%u   PackageIndex.get_sign_commandc       	      C   s
  i t  j d 6t  j d 6} | d k	 r6 t  j | d <n  g  } g  } t  j | |  } t d |  j d d | j | f ƒ } | j ƒ  t d |  j d d | j | f ƒ } | j ƒ  | d k	 rÜ | j	 j
 | ƒ | j	 j ƒ  n  | j ƒ  | j ƒ  | j ƒ  | j | | f S(   uæ  
        Run a command in a child process , passing it any input data specified.

        :param cmd: The command to run.
        :param input_data: If specified, this must be a byte string containing
                           data to be sent to the child process.
        :return: A tuple consisting of the subprocess' exit code, a list of
                 lines read from the subprocess' ``stdout``, and a list of
                 lines read from the subprocess' ``stderr``.
        u   stdoutu   stderru   stdinu   targetu   argsN(   u
   subprocessu   PIPEu   Noneu   Popenu   Threadu   _readeru   stdoutu   startu   stderru   stdinu   writeu   closeu   waitu   joinu
   returncode(	   u   selfu   cmdu
   input_datau   kwargsu   stdoutu   stderru   pu   t1u   t2(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   run_command®   s&    
$
$



u   PackageIndex.run_commandc       	      C   sb   |  j  | | | ƒ \ } } |  j | | j d ƒ ƒ \ } } } | d k r^ t d | ƒ ‚ n  | S(   u}  
        Sign a file.

        :param filename: The pathname to the file to be signed.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :return: The absolute pathname of the file where the signature is
                 stored.
        u   utf-8i    u&   sign command failed with error code %s(   u   get_sign_commandu   run_commandu   encodeu   DistlibException(	   u   selfu   filenameu   signeru   sign_passwordu   cmdu   sig_fileu   rcu   stdoutu   stderr(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu	   sign_fileÑ   s    	u   PackageIndex.sign_fileu   sdistu   sourcec             C   s²  |  j  ƒ  t j j | ƒ s/ t d | ƒ ‚ n  | j ƒ  | j ƒ  } d } | r‚ |  j sj t	 j
 d ƒ q‚ |  j | | | ƒ } n  t | d ƒ  }	 |	 j ƒ  }
 Wd QXt j |
 ƒ j ƒ  } t j |
 ƒ j ƒ  } | j i d d 6d d 6| d	 6| d
 6| d 6| d 6ƒ d t j j | ƒ |
 f g } | rt | d ƒ  }	 |	 j ƒ  } Wd QX| j d t j j | ƒ | f ƒ t j t j j | ƒ ƒ n  |  j | j ƒ  | ƒ } |  j | ƒ S(   uß  
        Upload a release file to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the file to be uploaded.
        :param filename: The pathname of the file to be uploaded.
        :param signer: The identifier of the signer of the file.
        :param sign_password: The passphrase for the signer's
                              private key used for signing.
        :param filetype: The type of the file being uploaded. This is the
                        distutils command which produced that file, e.g.
                        ``sdist`` or ``bdist_wheel``.
        :param pyversion: The version of Python which the release relates
                          to. For code compatible with any Python, this would
                          be ``source``, otherwise it would be e.g. ``3.2``.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        u   not found: %su)   no signing program available - not signedu   rbNu   file_uploadu   :actionu   1u   protcol_versionu   filetypeu	   pyversionu
   md5_digestu   sha256_digestu   contentu   gpg_signature(   u   check_credentialsu   osu   pathu   existsu   DistlibExceptionu   validateu   todictu   Noneu   gpgu   loggeru   warningu	   sign_fileu   openu   readu   hashlibu   md5u	   hexdigestu   sha256u   updateu   basenameu   appendu   shutilu   rmtreeu   dirnameu   encode_requestu   itemsu   send_request(   u   selfu   metadatau   filenameu   signeru   sign_passwordu   filetypeu	   pyversionu   du   sig_fileu   fu	   file_datau
   md5_digestu   sha256_digestu   filesu   sig_datau   request(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   upload_fileä   s<    

		
u   PackageIndex.upload_filec       
      C   sä   |  j  ƒ  t j j | ƒ s/ t d | ƒ ‚ n  t j j | d ƒ } t j j | ƒ si t d | ƒ ‚ n  | j ƒ  | j | j	 } } t
 | ƒ j ƒ  } d	 d | f d | f g } d | | f g } |  j | | ƒ }	 |  j |	 ƒ S(
   u2  
        Upload documentation to the index.

        :param metadata: A :class:`Metadata` instance defining at least a name
                         and version number for the documentation to be
                         uploaded.
        :param doc_dir: The pathname of the directory which contains the
                        documentation. This should be the directory that
                        contains the ``index.html`` for the documentation.
        :return: The HTTP response received from PyPI upon submission of the
                request.
        u   not a directory: %ru
   index.htmlu   not found: %ru   :actionu
   doc_uploadu   nameu   versionu   content(   u   :actionu
   doc_upload(   u   check_credentialsu   osu   pathu   isdiru   DistlibExceptionu   joinu   existsu   validateu   nameu   versionu   zip_diru   getvalueu   encode_requestu   send_request(
   u   selfu   metadatau   doc_diru   fnu   nameu   versionu   zip_datau   fieldsu   filesu   request(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   upload_documentation  s    

u!   PackageIndex.upload_documentationc             C   sj   |  j  d d d g } |  j r7 | j d |  j g ƒ n  | j d | | g ƒ t j d d j | ƒ ƒ | S(   u¢  
        Return a suitable command for verifying a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: The verifying command as a list suitable to be
                 passed to :class:`subprocess.Popen`.
        u   --status-fdu   2u   --no-ttyu	   --homediru   --verifyu   invoking: %su    (   u   gpgu   gpg_homeu   extendu   loggeru   debugu   join(   u   selfu   signature_filenameu   data_filenameu   cmd(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   get_verify_command5  s    	u   PackageIndex.get_verify_commandc             C   sk   |  j  s t d ƒ ‚ n  |  j | | ƒ } |  j | ƒ \ } } } | d k ra t d | ƒ ‚ n  | d k S(   u\  
        Verify a signature for a file.

        :param signature_filename: The pathname to the file containing the
                                   signature.
        :param data_filename: The pathname to the file containing the
                              signed data.
        :return: True if the signature was verified, else False.
        u0   verification unavailable because gpg unavailablei    i   u(   verify command failed with error code %s(   i    i   (   u   gpgu   DistlibExceptionu   get_verify_commandu   run_command(   u   selfu   signature_filenameu   data_filenameu   cmdu   rcu   stdoutu   stderr(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   verify_signatureG  s    
	u   PackageIndex.verify_signaturec             C   s  | d
 k r" d
 } t j d ƒ nM t | t t f ƒ rF | \ } } n d } t t | ƒ ƒ  } t j d | ƒ t | d ƒ ÿ } |  j	 t
 | ƒ ƒ } zÕ | j ƒ  }	 d }
 d } d } d } d |	 k rÜ t |	 d	 ƒ } n  | rõ | | |
 | ƒ n  xr | j |
 ƒ } | sPn  | t | ƒ 7} | j | ƒ | rD| j | ƒ n  | d 7} | rø | | |
 | ƒ qø qø Wd
 | j ƒ  XWd
 QX| d k r°| | k  r°t d | | f ƒ ‚ n  | r | j ƒ  } | | k rít d | | | | f ƒ ‚ n  t j d | ƒ n  d
 S(   u  
        This is a convenience method for downloading a file from an URL.
        Normally, this will be a file from the index, though currently
        no check is made for this (i.e. a file can be downloaded from
        anywhere).

        The method is just like the :func:`urlretrieve` function in the
        standard library, except that it allows digest computation to be
        done during download and checking that the downloaded data
        matched any expected value.

        :param url: The URL of the file to be downloaded (assumed to be
                    available via an HTTP GET request).
        :param destfile: The pathname where the downloaded file is to be
                         saved.
        :param digest: If specified, this must be a (hasher, value)
                       tuple, where hasher is the algorithm used (e.g.
                       ``'md5'``) and ``value`` is the expected value.
        :param reporthook: The same as for :func:`urlretrieve` in the
                           standard library.
        u   No digest specifiedu   md5u   Digest specified: %su   wbi    i   i    u   content-lengthu   Content-LengthNu1   retrieval incomplete: got only %d out of %d bytesu.   %s digest mismatch for %s: expected %s, got %su   Digest verified: %siÿÿÿÿ(   u   Noneu   loggeru   debugu
   isinstanceu   listu   tupleu   getattru   hashlibu   openu   send_requestu   Requestu   infou   intu   readu   lenu   writeu   updateu   closeu   DistlibExceptionu	   hexdigest(   u   selfu   urlu   destfileu   digestu
   reporthooku   digesteru   hasheru   dfpu   sfpu   headersu	   blocksizeu   sizeu   readu   blocknumu   blocku   actual(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   download_file[  sV    
u   PackageIndex.download_filec             C   sW   g  } |  j  r" | j |  j  ƒ n  |  j r> | j |  j ƒ n  t | Œ  } | j | ƒ S(   uÝ   
        Send a standard library :class:`Request` to PyPI and return its
        response.

        :param req: The request to send.
        :return: The HTTP response from PyPI (a standard library HTTPResponse).
        (   u   password_handleru   appendu   ssl_verifieru   build_openeru   open(   u   selfu   requ   handlersu   opener(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   send_request¨  s    		u   PackageIndex.send_requestc             C   s<  g  } |  j  } xy | D]q \ } } t | t t f ƒ sC | g } n  xA | D]9 } | j d | d | j d ƒ d | j d ƒ f ƒ qJ Wq WxG | D]? \ } }	 }
 | j d | d | |	 f j d ƒ d |
 f ƒ q’ W| j d | d d f ƒ d j | ƒ } d | } i | d 6t t | ƒ ƒ d	 6} t	 |  j
 | | ƒ S(
   u&  
        Encode fields and files for posting to an HTTP server.

        :param fields: The fields to send as a list of (fieldname, value)
                       tuples.
        :param files: The files to send as a list of (fieldname, filename,
                      file_bytes) tuple.
        s   --u)   Content-Disposition: form-data; name="%s"u   utf-8s    u8   Content-Disposition: form-data; name="%s"; filename="%s"s   
s   multipart/form-data; boundary=u   Content-typeu   Content-length(   u   boundaryu
   isinstanceu   listu   tupleu   extendu   encodeu   joinu   stru   lenu   Requestu   url(   u   selfu   fieldsu   filesu   partsu   boundaryu   ku   valuesu   vu   keyu   filenameu   valueu   bodyu   ctu   headers(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   encode_request¸  s4    	
u   PackageIndex.encode_requestc             C   sb   t  | t ƒ r i | d 6} n  |  j d  k rI t |  j d d ƒ|  _ n  |  j j | | p^ d ƒ S(   Nu   nameu   timeoutg      @u   and(   u
   isinstanceu   string_typesu	   rpc_proxyu   Noneu   ServerProxyu   urlu   search(   u   selfu   termsu   operator(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   searchã  s
    u   PackageIndex.searchN(   u   __name__u
   __module__u   __qualname__u   __doc__u   boundaryu   Noneu   __init__u   _get_pypirc_commandu   read_configurationu   save_configurationu   check_credentialsu   registeru   _readeru   get_sign_commandu   run_commandu	   sign_fileu   upload_fileu   upload_documentationu   get_verify_commandu   verify_signatureu   download_fileu   send_requestu   encode_requestu   search(   u
   __locals__(    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   PackageIndex   s*   
#4M+u   PackageIndex(   u   hashlibu   loggingu   osu   shutilu
   subprocessu   tempfileu	   threadingu   Threadu   ImportErroru   dummy_threadingu    u   DistlibExceptionu   compatu   HTTPBasicAuthHandleru   Requestu   HTTPPasswordMgru   urlparseu   build_openeru   string_typesu   utilu   cached_propertyu   zip_diru   ServerProxyu	   getLoggeru   __name__u   loggeru   DEFAULT_INDEXu   DEFAULT_REALMu   objectu   PackageIndex(    (    (    u2   /tmp/pip-zej_zi-build/pip/_vendor/distlib/index.pyu   <module>   s    .