Your IP : 216.73.216.213
B
tl�R� � @ s^ d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m
Z
d dlmZ d
dd �Z
dS )� N)�
ModuleType)�BDist)�Develop)� Installed)�SDist)�Wheelc C s( t | t�r.y
t| |�S ttfk
r, Y nX yt| � W n tk
rN Y n&X y
t| |�S ttfk
rr Y nX tj� | �� r�y
t
| |�S ttfk
r� Y nX y
t| |�S ttfk
r� Y nX y
t| |�S ttfk
� r� Y nX tj�
| ��r$y
t| |�S ttfk
�r" Y nX dS )aF 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 )Zpath_or_module�metadata_version� r �>/opt/alt/python37/lib/python3.7/site-packages/pkginfo/utils.py�get_metadata
s>