U eX @sddZddlZddlZddlZddlmZdZdZdZ dZ dZ d d Z dd d Z dd dZddZdS)zX Re-implementation of find_module and get_frozen_object from the deprecated imp module. N)module_from_speccCs(t|trtjjntjj}|||S)N) isinstancelist importlib machinery PathFinder find_specutil)modulepathsfinderr=/opt/hc_python/lib/python3.8/site-packages/setuptools/_imp.pyr s r c CsRt||}|dkrtd||js>t|dr>tjd|j}d}d}t|jt }|j dksp|rt |jtj j rt}d}d}}n|j dks|rt |jtj jrt}d}d}}n|jr6|j }tj|d }|tj jkrd nd }|tj jkrt}n&|tj jkr t}n|tj jkrt}|tthkrBt||}n d}d}}|||||ffS) z7Just like 'imp.find_module()', but with package supportN Can't find %ssubmodule_search_locationsz __init__.pyfrozenzbuilt-inrrrb)r ImportError has_locationhasattrr rspec_from_loaderloaderrtypeorigin issubclassr FrozenImporter PY_FROZENBuiltinImporter C_BUILTINospathsplitextSOURCE_SUFFIXES PY_SOURCEBYTECODE_SUFFIXES PY_COMPILEDEXTENSION_SUFFIXES C_EXTENSIONopen) rrspeckindfileZstaticr(suffixmoderrr find_modulesJ       r6cCs&t||}|std||j|SNr)r rrget_code)rrr1rrrget_frozen_objectGs  r9cCs"t||}|std|t|Sr7)r rr)rrinfor1rrr get_moduleNs  r;)N)N)__doc__r'importlib.utilr importlib.machineryZ py34compatrr+r-r/r&r$r r6r9r;rrrrs  *