B
    B{[                 @   s^   d dl Z d dlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	d
ZdS )    N)
ModuleType   )BDist)Develop)	Installed)SDist)Wheelc          	   C   sN  t | tr.y
t| |S  ttfk
r,   Y nX yt|  W n tk
rN   Y n&X y
t| |S  ttfk
rr   Y nX tj	|  ry
t
| |S  ttfk
r   Y nX y
t| |S  ttfk
r   Y nX y
t| |S  ttfk
 r   Y nX tj| rJy
t| |S  ttfk
r"   Y nX y
t| |S  ttfk
rH   Y nX dS )a>   Try to create a Distribution 'path_or_module'.

    o 'path_or_module' may be a module object.

    o If a string, 'path_or_module' may point to an sdist file, a bdist
      file, an installed package, or a working checkout (if it contains
      PKG-INFO).

    o Return None if 'path_or_module' can't be parsed.
    N)
isinstancer   r   
ValueErrorIOError
__import__ImportErrorospathisfiler   r   r   isdirr   )Zpath_or_moduleZmetadata_version r   ,lib/python3.7/site-packages/pkginfo/utils.pyget_metadata
   sF    







r   )N)r   typesr   Zbdistr   Zdevelopr   Z	installedr   Zsdistr   Zwheelr   r   r   r   r   r   <module>   s   