
    ,hM                    D   d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm	Z	m
Z
mZ d dlmZ ddlmZ ddlmZmZmZmZ  ed	      Zd
dgZ G d d
      Zd Zej0                  j3                  d      s.ej0                  dk7  r	 d	 	 	 ddZ	 d	 	 	 	 	 	 	 ddZeddgz  Zyyy)    )annotationsN)CodeType)AnyLiteralTypeVar)Version   )_imp)PY_COMPILED	PY_FROZEN	PY_SOURCEfind_module_TRequirer   c                  T    e Zd ZdZ	 	 	 d		 	 	 d
dZd Zd Z	 d	 	 	 ddZddZddZ	y)r   z7A prerequisite to building or installing a distributionNc                ~    ||t         }| ||      }|d}| j                  j                  t                      | `y )N__version__)r   __dict__updatelocalsself)r   namerequested_versionmodulehomepage	attributeformats          T/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/setuptools/depends.py__init__zRequire.__init__   sJ     >/;F &'8 9 )	VX&I    c                h    | j                   | j                   d| j                    S | j                  S )z0Return full package/distribution name, w/version-)r   r   )r   s    r   	full_namezRequire.full_name+   s4    !!-ii[$"8"8!9::yyr    c                    | j                   du xs> | j                  du xs. t        |      dk7  xr | j                  |      | j                  k\  S )z%Is 'version' sufficiently up-to-date?Nunknown)r   r   strr   )r   versions     r   
version_okzRequire.version_ok1   sS     NNd" ?{{d"?7|y( ?G$(>(>>		
r    c                $   | j                   /	 t        | j                  |      \  }}}|r|j	                          |S t        | j                  | j                   ||      }|!||ur| j                  | j                  |      S |S # t        $ r Y yw xY w)a  Get version number of installed module, 'None', or 'default'

        Search 'paths' for module.  If not found, return 'None'.  If found,
        return the extracted version attribute, or 'default' if no version
        attribute was specified, or the value cannot be determined without
        importing the module.  The version is formatted according to the
        requirement's version format (if any), unless it is 'None' or the
        supplied 'default'.
        N)r   r   r   ImportErrorcloseget_module_constantr   )r   pathsdefaultf_p_ivs          r   get_versionzRequire.get_version:   s     >>!'U;	2r 	NT^^WeL=Qg-$++2I;;q>!  s   B 	BBc                (    | j                  |      duS )z/Return true if dependency is present on 'paths'N)r3   )r   r-   s     r   
is_presentzRequire.is_presentW   s    &d22r    c                ^    | j                  |      }|y| j                  t        |            S )z>Return true if dependency is present and up-to-date on 'paths'F)r3   r(   r&   )r   r-   r'   s      r   
is_currentzRequire.is_current[   s-    ""5)?s7|,,r    ) NN)r   r&   returnNone)Nr%   )r.   z_T | Literal['unknown']r9   z$_T | Literal['unknown'] | None | AnyN)
__name__
__module____qualname____doc__r   r#   r(   r3   r5   r7    r    r   r   r      sX    A 
  
(
 >G#:	-:3-r    c                j    t         j                  d        }| s |       S t        j                  |       S )Nc               3     K   d  y wr;   r@   r@   r    r   emptyzmaybe_close.<locals>.emptyd   s     s   )
contextlibcontextmanagerclosing)r/   rC   s     r   maybe_closerG   c   s7      wa  r    javaclic                   	 t        | |      x\  }}\  }}}}	t        |      5  |t        k(  r'|j	                  d       t        j                  |      }
nr|t        k(  rt        j                  | |      }
nR|t        k(  rt        |j	                         |d      }
n-t        j                  | ||	      }t        ||d      cddd       S ddd       t        
||      S # t        $ r Y yw xY w# 1 sw Y   %xY w)a  Find 'module' by searching 'paths', and extract 'symbol'

        Return 'None' if 'module' does not exist on 'paths', or it does not define
        'symbol'.  If the module defines 'symbol' as a constant, return the
        constant.  Otherwise, return 'default'.N   exec)r   r*   rG   r   readmarshalloadr   r
   get_frozen_objectr   compile
get_modulegetattrextract_constant)r   symbolr.   r-   r/   path_suffix_modekindinfocodeimporteds               r   r,   r,   s   s    	5@5OO+At+gudd
 ^ 	7{"q	||A"--fe<"qvvxv6  ??65$?x6	7 	7 	7  fg66#  			7 	7s   C BC*	C'&C'*C3c                   || j                   vryt        | j                         j                  |      }t        j                  d   }t        j                  d   }t        j                  d   }|}t        j
                  |       D ]H  }|j                  }	|j                  }
|	|k(  r|
J | j                  |
   }4|
|k(  r|	|k(  s|	|k(  r|c S |}J y)a/  Extract the constant value of 'symbol' from 'code'

        If the name 'symbol' is bound to a constant value by the Python code
        object 'code', return that value.  If 'symbol' is bound to an expression,
        return 'default'.  Otherwise, return 'None'.

        Return value is based on the first assignment to 'symbol'.  'symbol' must
        be a global, or at least a non-"fast" local in the code block.  That is,
        only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol'
        must be present in 'code.co_names'.
        N
STORE_NAMESTORE_GLOBAL
LOAD_CONST)	co_nameslistindexdisopmapBytecodeopcodearg	co_consts)r[   rU   r.   name_idxr^   r_   r`   const	byte_codeoprh   s              r   rT   rT      s     &&,,V4YY|,
yy0YY|,
d+ 
	 I!!B--CZ&s+bJ&6":L
	  r    r,   rT   )N)r.   _T | intr9   _T | int | None | Any)rn   )r[   r   rU   r&   r.   ro   r9   rp   )
__future__r   rD   rd   rN   systypesr   typingr   r   r   packaging.versionr   r8   r
   r   r   r   r   r   __all__r   rG   platform
startswithr,   rT   r@   r    r   <module>ry      s    "  
  
  ( ( %  @ @T]m
$L- L-^	! ||v&3<<5+@ 7;7!)7	7> :<&& #&.6&	&P %'9::GQ ,A&r    