a (ReX @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/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/_imp.pyr s r c CsRt||}|durtd||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 jvrd nd }|tj jvrt}n&|tj jvr t}n|tj jvrt}|tthvrBt||}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_modulesF         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  *