Your IP : 18.117.231.160
B
��ReX � @ sd d Z ddlZddlZddlZddlmZ dZdZdZ dZ
dZd d
� Zddd�Z
dd
d�Zdd� ZdS )zX
Re-implementation of find_module and get_frozen_object
from the deprecated imp module.
� N� )�module_from_spec� � � � c C s( t |t�rtj�� jntjj}|| |�S )N)�
isinstance�list� importlib� machinery�
PathFinder� find_spec�util)�module�paths�finder� r ��/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/_imp.pyr
s r
c C sR t | |�}|dkrtd| ��|js>t|d�r>tj�d|j�}d}d}t|jt �}|j
dksp|r�t|jtjj
�r�t}d}d }}n�|j
dks�|r�t|jtjj�r�t}d}d }}n�|j�r6|j
}tj�|�d }|tjjkr�d
nd}|tjjkr�t}n&|tjjk�r
t}n|tjjk�rt}|tthk�rBt||�}nd}d }}|||||ffS )z7Just like 'imp.find_module()', but with package supportNz
Can't find %s�submodule_search_locationsz__init__.py����frozen� zbuilt-inr �r�rb)r
�ImportError�has_location�hasattrr
r �spec_from_loader�loaderr �type�origin�
issubclassr �FrozenImporter� PY_FROZEN�BuiltinImporter� C_BUILTIN�os�path�splitext�SOURCE_SUFFIXES� PY_SOURCE�BYTECODE_SUFFIXES�PY_COMPILED�EXTENSION_SUFFIXES�C_EXTENSION�open) r r �spec�kind�fileZstaticr'