<!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>
ž
«ÿf¼-  c               @   s¢   d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m	 Z	 d d l
 m Z d d l Td d l m Z Gd d „  d e ƒ Z d S(	   uh   distutils.command.register

Implements the Distutils 'register' command (register with the repository).
i    N(   u   warn(   u   PyPIRCCommand(   u   *(   u   logc             B   sÓ   |  Ee  Z d  Z d Z e j d d  g Z e j d d d g Z d d d	 „  f g Z 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 „  Z d d d „ Z d S(!   u   registeru7   register the distribution with the Python package indexu   list-classifiersu    list the valid Trove classifiersu   strictuB   Will stop the registering if the meta-data are not fully compliantu   verifyu   checkc             C   s   d S(   NT(   u   True(   u   self(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   <lambda>   s    u   register.<lambda>c             C   s#   t  j |  ƒ d |  _ d |  _ d  S(   Ni    (   u   PyPIRCCommandu   initialize_optionsu   list_classifiersu   strict(   u   self(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   initialize_options   s    	u   register.initialize_optionsc             C   s>   t  j |  ƒ i d |  j f d 6d d 6} | |  j j d <d  S(   Nu   registeru   stricti   u   restructuredtextu   check(   u   registeri   (   u   PyPIRCCommandu   finalize_optionsu   strictu   distributionu   command_options(   u   selfu   check_options(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   finalize_options$   s    
u   register.finalize_optionsc             C   sr   |  j  ƒ  |  j ƒ  x! |  j ƒ  D] } |  j | ƒ q! W|  j rN |  j ƒ  n  |  j rd |  j ƒ  n
 |  j ƒ  d  S(   N(	   u   finalize_optionsu   _set_configu   get_sub_commandsu   run_commandu   dry_runu   verify_metadatau   list_classifiersu   classifiersu   send_metadata(   u   selfu   cmd_name(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   run+   s    

		u   register.runc             C   sL   t  d t ƒ |  j j d ƒ } | j ƒ  |  j | _ d | _ | j ƒ  d S(   u   Deprecated API.ud   distutils.command.register.check_metadata is deprecated,               use the check command insteadu   checki   N(   u   warnu   PendingDeprecationWarningu   distributionu   get_command_obju   ensure_finalizedu   strictu   restructuredtextu   run(   u   selfu   check(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   check_metadata:   s    

	u   register.check_metadatac             C   s±   |  j  ƒ  } | i  k rX | d |  _ | d |  _ | d |  _ | d |  _ d |  _ nU |  j d |  j f k r† t d |  j ƒ ‚ n  |  j d k r¤ |  j |  _ n  d	 |  _ d S(
   u:    Reads the configuration file and set attributes.
        u   usernameu   passwordu
   repositoryu   realmu   pypiu   %s not found in .pypircNTF(
   u   _read_pypircu   usernameu   passwordu
   repositoryu   realmu   Trueu
   has_configu   DEFAULT_REPOSITORYu
   ValueErroru   False(   u   selfu   config(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   _set_configD   s    u   register._set_configc             C   s9   |  j  d } t j j | ƒ } t j |  j | ƒ ƒ d S(   u8    Fetch the list of classifiers from the server.
        u   ?:action=list_classifiersN(   u
   repositoryu   urllibu   requestu   urlopenu   logu   infou   _read_pypi_response(   u   selfu   urlu   response(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   classifiersU   s    u   register.classifiersc             C   s9   |  j  |  j d ƒ ƒ \ } } t j d | | f ƒ d S(   uF    Send the metadata to the package index server to be checked.
        u   verifyu   Server response (%s): %sN(   u   post_to_serveru   build_post_datau   logu   info(   u   selfu   codeu   result(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   verify_metadata\   s    u   register.verify_metadatac       
      C   sö  |  j  r$ d } |  j } |  j } n d } d } } d j ƒ  } xT | | k r– |  j d t j ƒ t ƒ  } | sz d } qC | | k rC t d ƒ qC qC W| d k rx | s» t d ƒ } q¦ Wx | s× t	 j	 d ƒ } q¿ Wt
 j j ƒ  } t
 j j |  j ƒ d	 } | j |  j | | | ƒ |  j |  j d
 ƒ | ƒ \ } } |  j d | | f t j ƒ | d k rò|  j  r{| |  j _ q|  j d t j ƒ |  j d |  j ƒ  t j ƒ d } x1 | j ƒ  d k rät d ƒ } | s´d } q´q´W| j ƒ  d k r|  j | | ƒ qqònâ| d k ri d d 6}	 d |	 d <|	 d <|	 d <d# |	 d <x |	 d smt d ƒ |	 d <qPWx• |	 d |	 d k rx! |	 d s¨t	 j	 d ƒ |	 d <qˆWx! |	 d sÌt	 j	 d ƒ |	 d <q¬W|	 d |	 d k rqd |	 d <d# |	 d <t d ƒ qqqqWx |	 d s&t d ƒ |	 d <q	W|  j |	 ƒ \ } } | d k rbt j d | | f ƒ qòt j d ƒ t j d ƒ ns | d  k ròi d! d 6}	 d |	 d <x |	 d sÂt d" ƒ |	 d <q¥W|  j |	 ƒ \ } } t j d | | f ƒ n  d# S($   u_   Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        u   1u   xu    u   1 2 3 4uâ   We need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: u&   Please choose one of the four options!u
   Username: u
   Password: i   u   submitu   Server response (%s): %siÈ   uA   I can store your PyPI login so future submissions will be faster.u    (the login will be stored in %s)u   Xu   ynu   Save your login (y/N)?u   nu   yu   2u   useru   :actionu   nameu   passwordu   emailu   confirmu
    Confirm: u!   Password and confirm don't match!u
      EMail: u"   You will receive an email shortly.u7   Follow the instructions in it to complete registration.u   3u   password_resetu   Your email address: N(   u
   has_configu   usernameu   passwordu   splitu   announceu   logu   INFOu   inputu   printu   getpassu   urllibu   requestu   HTTPPasswordMgru   parseu   urlparseu
   repositoryu   add_passwordu   realmu   post_to_serveru   build_post_datau   distributionu   _get_rc_fileu   loweru   _store_pypircu   Noneu   info(
   u   selfu   choiceu   usernameu   passwordu   choicesu   authu   hostu   codeu   resultu   data(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   send_metadatac   sŒ    		
				
		
	



u   register.send_metadatac             C   s  |  j  j } i | d 6d d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d	 6| j ƒ  d
 6| j	 ƒ  d 6| j
 ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6| j ƒ  d 6} | d s| d s| d rd | d <n  | S(   Nu   :actionu   1.0u   metadata_versionu   nameu   versionu   summaryu	   home_pageu   authoru   author_emailu   licenseu   descriptionu   keywordsu   platformu   classifiersu   download_urlu   providesu   requiresu	   obsoletesu   1.1(   u   distributionu   metadatau   get_nameu   get_versionu   get_descriptionu   get_urlu   get_contactu   get_contact_emailu   get_licenceu   get_long_descriptionu   get_keywordsu   get_platformsu   get_classifiersu   get_download_urlu   get_providesu   get_requiresu   get_obsoletes(   u   selfu   actionu   metau   data(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   build_post_dataÝ   s,    u   register.build_post_datac             C   s²  d | k r3 |  j  d | d |  j f t j ƒ n  d } d | } | d } t j ƒ  } xÅ | j ƒ  D]· \ } } t | ƒ t g  ƒ t f  ƒ f k r¢ | g } n  xx | D]p } t | ƒ } | j	 | ƒ | j	 d | ƒ | j	 d ƒ | j	 | ƒ | r© | d d	 k r© | j	 d
 ƒ q© q© Wqf W| j	 | ƒ | j	 d
 ƒ | j
 ƒ  j d ƒ } i d | d 6t t | ƒ ƒ d 6}	 t j j |  j | |	 ƒ }
 t j j t j j d | ƒ ƒ } d } y | j |
 ƒ } Wn” t j j k
 r#} z2 |  j rÿ| j j ƒ  } n  | j | j f } WYd d } ~ Xn[ t j j k
 r_} z d t | ƒ f } WYd d } ~ Xn X|  j rx| j ƒ  } n  d } |  j r®d d } |  j  d | | | f ƒ n  | S(   uC    Post a query to the server, and return a string response.
        u   nameu   Registering %s to %su3   --------------GHSKFJDLGDS7543FJKLFHRE75642756743254u   
--u   --u*   
Content-Disposition: form-data; name="%s"u   

i   u   u   
u   utf-8u/   multipart/form-data; boundary=%s; charset=utf-8u   Content-typeu   Content-lengthu   password_mgru    Niô  iÈ   u   OKu   -iK   u   %s%r%siÿÿÿÿ(   iÈ   u   OK(   u   announceu
   repositoryu   logu   INFOu   iou   StringIOu   itemsu   typeu   stru   writeu   getvalueu   encodeu   lenu   urllibu   requestu   Requestu   build_openeru   HTTPBasicAuthHandleru   openu   erroru	   HTTPErroru   show_responseu   fpu   readu   codeu   msgu   URLError(   u   selfu   datau   authu   boundaryu   sep_boundaryu   end_boundaryu   bodyu   keyu   valueu   headersu   requ   openeru   resultu   eu   dashes(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   post_to_serverù   sX    


$		$%		
u   register.post_to_serverN(   u   list-classifiersNu    list the valid Trove classifiers(   u   strictNuB   Will stop the registering if the meta-data are not fully compliant(   u   __name__u
   __module__u   __qualname__u   descriptionu   PyPIRCCommandu   user_optionsu   Noneu   boolean_optionsu   sub_commandsu   initialize_optionsu   finalize_optionsu   runu   check_metadatau   _set_configu   classifiersu   verify_metadatau   send_metadatau   build_post_datau   post_to_server(   u
   __locals__(    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   register   s&     

zu   register(   u   __doc__u   osu   stringu   getpassu   iou   urllib.parseu   urllibu   urllib.requestu   warningsu   warnu   distutils.coreu   PyPIRCCommandu   distutils.errorsu	   distutilsu   logu   register(    (    (    u?   /opt/alt/python33/lib64/python3.3/distutils/command/register.pyu   <module>   s   $
