Hacked By AnonymousFox
B
YI~d7, � @ s( d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm Z d dlm
Z
d d lmZ d d
lmZ d dlm
Z
dd
lmZ ddlZddlZddlZddlZddlZdd� Zdd� Zd#dd�Zd$dd�Zedd� �Zdd� Zdd� Zdd� ZG dd � d ej�ZG d!d"� d"ej�Z dS )%� )�abc)�module_from_spec)�
_resolve_name)�spec_from_loader)�
_find_spec)�MAGIC_NUMBER)�_RAW_MAGIC_NUMBER)�cache_from_source)�
decode_source)�source_from_cache)�spec_from_file_location� )�contextmanagerNc C s t �t| �S )N)�_imp�source_hashr )�source_bytes� r �3/opt/alt/python37/lib64/python3.7/importlib/util.pyr s r c C s^ | � d�s| S |s&tdt| �� d���d}x| D ]}|dkr>P |d7 }q0W t| |d � ||�S )N�.zno package specified for z% (required for relative module names)r
r )�
startswith�
ValueError�reprr )�name�package�level� characterr r r �resolve_name s
r c C sx | t jkrt| |�S t j| }|d kr*d S y
|j}W n$ tk
rX td�| ��d �Y nX |d krptd�| ���|S d S )Nz{}.__spec__ is not setz{}.__spec__ is None)�sys�modulesr �__spec__�AttributeErrorr �format)r �path�module�specr r r �_find_spec_from_path* s
r% c
C s� | � d�rt| |�n| }|tjkr�|�d�d }|r�t|dgd�}y
|j}W q� tk
r� } ztd|�d|��|d�|�W d d }~X Y q�X nd }t ||�S tj| }|d kr�d S y
|j
}W n$ tk
r� td�| ��d �Y nX |d kr�td �| ���|S d S )
Nr r
�__path__)�fromlistz __path__ attribute not found on z while trying to find )r z{}.__spec__ is not setz{}.__spec__ is None)
r r r r �
rpartition�
__import__r&