
    ,h                         d Z ddlZddlZddlmZ ddlmZmZ d Ze	dk(  r		  e        yy# e$ rZ
 ej                  e
       Y dZ
[
ydZ
[
ww xY w)a  
Utility for locating the module (or package's __init__.py)
associated with a given console_script name
and verifying it contains the PYTHON_ARGCOMPLETE_OK marker.

Such scripts are automatically generated and cannot contain
the marker themselves, so we defer to the containing module or package.

For more information on setuptools console_scripts, see
https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation

Intended to be invoked by argcomplete's global completion function.
    N)iter_entry_points   )ArgcompleteMarkerNotFoundfindc                  Z   t         j                  d   } t        j                  j	                  |       }t        t        d|            }|st        d      |\  }|j                  }|j                  d   }t        |       5 }|j                         }d d d        dj                  ||      vrt        d      dj                  |      |vrt        d      t        t        |d	            5 }|j                  d
      }d d d        dvrt        d      y # 1 sw Y   xY w# 1 sw Y   %xY w)Nr   console_scriptsz$no entry point found matching scriptr   zfrom {} import {}z&does not appear to be a console scriptzsys.exit({}())T)return_packagei   PYTHON_ARGCOMPLETE_OKzmarker not found)sysargvospathbasenamelistr   r   module_nameattrsopenreadformatr   )	script_pathnameentry_pointsentry_pointr   function_namefscriptheads	            c/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/argcomplete/_check_console_script.pymainr      s#   ((1+K 77K(D)*;TBCL'(NOO M[))K%%a(M 
k	 a!!+}=VK'(PQQ}-V;'(PQQ 
d;t4	5 vvd|d*'(:;; +  s   ?D+D!D!D*__main__)__doc__r   r   pkg_resourcesr   _check_moduler   r   r   __name__eexit     r   <module>r)      sW    
 
 + :<: z  % s   + AAA