Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/twine/commands/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/twine/commands/__pycache__/register.cpython-37.pyc

B

Fd�W��@spddlmZmZmZddlZddlZddlZddlm	Z
ddlmZddl
mZddlmZdd�Zd	d
�ZdS)�)�absolute_import�unicode_literals�print_functionN)�
exceptions)�PackageFile)�
Repository)�utilsc	Cs�t�|||�}	t�|	d�|	d<td�|	d��t�||	�}t�||	�}t�||	�}
t�||	�}t	|	d||�}|�
|
�|�|�tj
�|�s�t�d�|���|�t�||��}|��|jr�t�d�|	d|jd���|��dS)N�
repositoryzRegistering package to {0}z("{0}" does not exist on the file system.zE"{0}" attempted to redirect to "{1}" during registration. Aborting...�location)rZget_repository_from_configZnormalize_repository_url�print�formatZget_usernameZget_passwordZ
get_cacertZget_clientcertrZset_certificate_authorityZset_client_certificate�os�path�exists�excZPackageNotFound�registerr�
from_filename�closeZis_redirectZRedirectDetected�headersZraise_for_status)�packager	�username�password�comment�config_fileZcertZclient_certZrepository_url�configZca_certZresp�r�H/opt/alt/python37/lib/python3.7/site-packages/twine/commands/register.pyrs2

rc
Cstjdd�}|jddtjdddd�|jd	tjd
dddd
�|jddtjdddd�|jddtjdddd�|jdddd�|jdddd�|jdd d!d"�|jd#d d$d"�|jd%d%d&d"�|�|�}ytft|��Wn6tk
�r}zt	�
d'j|d(��Wdd}~XYnXdS))Nztwine register)�progz-rz--repositoryZTWINE_REPOSITORY�pypiz�The repository to register the package to. Can be a section in the config file or a full URL to the repository (default: %(default)s))�action�env�default�helpz--repository-urlZTWINE_REPOSITORY_URLFz�The repository URL to upload the package to. This can be specified with --repository because it will be used if there is no configuration for the value passed to --repository.)rr r!�requiredr"z-uz
--usernameZTWINE_USERNAMEzdThe username to authenticate to the repository as (can also be set via %(env)s environment variable))rr r#r"z-pz
--passwordZTWINE_PASSWORDzfThe password to authenticate to the repository with (can also be set via %(env)s environment variable)z-cz	--commentz1The comment to include with the distribution file)r"z
--config-filez	~/.pypirczThe .pypirc config file to use)r!r"z--certrzPath to alternate CA bundle)�metavarr"z
--client-certziPath to SSL client certificate, a single file containing the private key and the certificate in PEM formarz,File from which we read the package metadataz{exc.__class__.__name__}: {exc})r)�argparse�ArgumentParser�add_argumentrZEnvironmentDefault�
parse_argsr�vars�	Exception�sys�exitr)�args�parserrrrr�mainAs`


r/)�
__future__rrrr%�os.pathr
r+�twinerrZ
twine.packagerZtwine.repositoryrrrr/rrrr�<module>s'