Your IP : 216.73.216.213
B
�ڦT� � @ s� d Z yddlmZ W n ek
r4 ddlmZ Y nX ddlmZ ddlZddlZddlZddl m
Z
ddd�ZG dd � d e�Z
G d
d� de
�ZG dd
� d
e
�ZG dd� de
�ZG dd� de
�Zeeeed�Zddd�ZdS )an Print the metadata for one or more Python package distributions.
Usage: %prog [options] path+
Each 'path' entry can be one of the following:
o a source distribution: in this case, 'path' should point to an existing
archive file (.tar.gz, .tar.bz2, or .zip) as generated by 'setup.py sdist'.
o a binary distribution: in this case, 'path' should point to an existing
archive file (.egg)
o a "develop" checkout: in ths case, 'path' should point to a directory
intialized via 'setup.py develop' (under setuptools).
o an installed package: in this case, 'path' should be the importable name
of the package.
� )�ConfigParser)�writerN)�get_metadatac C s t jtd�}|jddd dd� |jdddd d
d� |jdd
ddd� |jddddddd� |jddddddd� |jdddd d!d� |jd"ddd#d$d%� |jd&d'd(d)d*d� |jd+d,d(d-d.d� |jd/ddd0d1d%� |jd2ddd3d4d%� |�| �\}} t| �d5k�r|�d6� n|| fS d S )7N)�usagez-mz--metadata-versionzOverride metadata version)�default�helpz-fz--field�fields�appendz$Specify an output field (repeatable))�dest�actionr z-dz--download-url-prefix�download_url_prefixzDownload URL prefix)r
r z--simple�outputZstore_const�simplez Output as simple key-value pairs)r
r �constr r z-sz--skip�skip�
store_trueTz$Skip missing values in simple output)r
r r r z-Sz --no-skipZstore_falsez*Don't skip missing values in simple outputz--single�singlezOutput delimited values)r
r r r z--item-delim�
item_delim�store�;z*Delimiter for fields in single-line outputz--sequence-delim�sequence_delim�,z!Delimiter for multi-valued fieldsz--csv�csvz
Output as CSVz--ini�iniz
Output as INIr z3Pass one or more files or directories as arguments.)�optparse�OptionParser�__doc__�
add_option�
parse_args�len�error)�args�parser�options� r$ �D/opt/alt/python37/lib/python3.7/site-packages/pkginfo/commandline.py�_parse_options sF
r&