o
    UÌhú  ã                   @   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   sD  t | tƒrzt| |ƒW S  ttfy   Y nw zt| ƒ W n	 ty&   Y nw zt| |ƒW S  ttfy8   Y nw tj 	| ¡ruzt
| |ƒW S  ttfyP   Y nw zt| |ƒW S  ttfyb   Y nw zt| |ƒW S  ttfyt   Y nw tj | ¡r zt| |ƒW S  ttfyŒ   Y nw zt| |ƒW S  ttfyŸ   Y dS w 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   )Úpath_or_moduleÚmetadata_version© r   úa/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/pkginfo/utils.pyÚget_metadata
   sX   
ÿÿÿÿÿÿÿÿør   )N)r   Útypesr   Úbdistr   Údevelopr   Ú	installedr   Úsdistr   Úwheelr   r   r   r   r   r   Ú<module>   s    