
    vKg#K                        S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr  SSK	J
r
  SSKJr  SSKJr  S\R                  ;   r\R"                  R%                  \R&                  5      r\R"                  R%                  \R*                  5      r\R"                  R%                  \R.                  5      r\R"                  R%                  \R2                  5      rS	\R6                  ;   a)  \R"                  R9                  \R6                  S	   5      rOa\R<                  (       a?  \R"                  R?                  \R"                  R9                  \R<                  5      5      rO\R@                  " 5       rS
 r!\"" \SS5      r#S r$\RJ                  S:X  a  \S 5       r&\&" \5      r\&" \#5      r#S r'\'" 5       r(Sr) \((       d  \RT                  r)S r,S+S jr-\S 5       r.S r/S r0S r1S r2S r3S r4S,S jr5\Rl                  S 5       r7S r8S r9S r:S-S jr;\Rx                  " S 5      r=\Rx                  " S!5      r>\Rx                  " S"5      r?S-S# jr@S$ rASqBS% rCS& rD\S'\ES(\ES)\E4S* j5       rFg! \+ a     Nf = f).a  Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
    N)	pass_none   )py39)DistutilsPlatformError)is_mingw__pypy___PYTHON_PROJECT_BASEc                 x   ^ [         R                  " U 5      R                  S5      m[        U4S jS 5       5      $ )zQ
Return True if the target directory appears to point to an
un-installed Python.
Modulesc              3   `   >#    U H$  nTR                  U5      R                  5       v   M&     g 7fN)joinpathis_file).0fnmoduless     _/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/setuptools/_distutils/sysconfig.py	<genexpr>(_is_python_source_dir.<locals>.<genexpr>5   s*     Q8P"w#++--8Ps   +.)SetupzSetup.local)pathlibPathr   any)dr   s    @r   _is_python_source_dirr   /   s/    
 ll1o&&y1GQ8PQQQ    _homec                     [         R                  R                  U 5      R                  [         R                  R                  U5      5      $ )z$
Return True if a is a parent of b.
)ospathnormcase
startswith)dir_adir_bs     r   
_is_parentr%   ;   s3     77E"--bgg.>.>u.EFFr   ntc                 L   ^  [         [        4nU 4S jU 5       n[        UT 5      $ )Nc              3      >#    U H8  n[        T[        R                  R                  US 5      5      (       d  M4  Uv   M:     g7f)PCbuildN)r%   r   r    join)r   prefixr   s     r   r   _fix_pcbuild.<locals>.<genexpr>H   s3      
"!RWW\\&)<= F"s
   2A	A)PREFIXBASE_PREFIXnext)r   prefixesmatcheds   `  r   _fix_pcbuildr2   D   s-     ;&
"

 GQr   c                  T    [         (       a  [        [         5      $ [        [        5      $ r   )	_sys_homer   project_base r   r   _python_buildr7   S   s    y$Y// ..r    c                  .    S[         R                  SS -  $ )zReturn a string containing the major and minor Python version,
leaving off the patchlevel.  Sample return values could be '1.5'
or '2.2'.
z%d.%dN   )sysversion_infor6   r   r   get_python_versionr=   i   s    
 S%%bq)))r   c                    U (       a  [         O[        nUb  UOUn[        5       (       a  SO[        R                  n [        5       SU 3   nU" X1U 5      $ ! [         a    [        S[        R                   S35      ef = f)a  Return the directory containing installed Python header files.

If 'plat_specific' is false (the default), this is the path to the
non-platform-specific header files, i.e. Python.h and so on;
otherwise, this is the path to platform-specific header files
(namely pyconfig.h).

If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
posix_get_python_inc_zCI don't know where Python installs its C header files on platform '')BASE_EXEC_PREFIXr.   r   r   nameglobalsKeyErrorr   )plat_specificr+   default_prefixresolved_prefixos_namegetters         r   get_python_incrK   q   s     *7%KN & 2fO!gG
-gY78 /=99  
$GG9A'
 	

s   A (A>c                 R    [         R                  R                  U 5      (       a  U $ S$ )z-
Replace path with None if it doesn't exist.
N)r   r    exists)r    s    r   _extantrN      s!    
 77>>$''41T1r   c                     [         (       a4  [        R                  S:  a   [        R                  R                  U S5      $ [        U5      =(       d&    [        [        X!5      5      =(       d    [        U 5      $ )N      include)
IS_PYPYr;   r<   r   r    r*   _get_python_inc_posix_pythonrN   _get_python_inc_from_config_get_python_inc_posix_prefixr+   spec_prefixrF   s      r   _get_python_inc_posixrZ      sV    w3##f,ww||FI..$]3 	0.}JK	0'/r   c                     [         (       d  gU (       a  [        =(       d    [        $ [        R                  R                  [        S5      S5      n[        R                  R                  U5      $ )z
Assume the executable is in the build directory. The
pyconfig.h file should be in the same directory. Since
the build directory may not be the source directory,
use "srcdir" from the makefile to find the "Include"
directory.
NsrcdirInclude)python_buildr4   r5   r   r    r*   get_config_varnormpath)rF   incdirs     r   rU   rU      sH     <(L(WW\\.2I>F77F##r   c                 ,    Uc  [        SU -  S-   5      $ g)a*  
If no prefix was explicitly specified, provide the include
directory from the config vars. Useful when
cross-compiling, since the config vars may come from
the host
platform Python installation, while the current Python
executable is from the build platform installation.

>>> monkeypatch = getfixture('monkeypatch')
>>> gpifc = _get_python_inc_from_config
>>> monkeypatch.setitem(gpifc.__globals__, 'get_config_var', str.lower)
>>> gpifc(False, '/usr/bin/')
>>> gpifc(False, '')
>>> gpifc(False, None)
'includepy'
>>> gpifc(True, None)
'confincludepy'
NCONF	INCLUDEPY)r_   )rF   rY   s     r   rV   rV      s$    & f}4{BCC r   c                     [         (       a  SOSnU[        5       -   [        -   n[        R                  R                  U SU5      $ )NpypypythonrS   )rT   r=   build_flagsr   r    r*   )r+   implementation
python_dirs      r   rW   rW      s7    &wVHN"4"66DJ77<<	:66r   c                 4   [         (       an  [        R                  R                  U S5      [        R                  R                  -   [        R                  R                  [        R                  " 5       5      -   $ [        R                  R                  U S5      $ )NrS   )r^   r   r    r*   pathsepdirname	sysconfigget_config_h_filenamerX   s      r   _get_python_inc_ntrp      sf    | GGLL+ggooggooi==?@A	

 77<<	**r   c                 T    U (       a  U$ [         R                  R                  US5      $ )Nsite-packages)r   r    r*   )standard_lib	libpythonearly_prefixr+   s       r   
_posix_librv      s     ww||I77r   c                    [         (       a}  [        R                  S:  ai  Uc  [        nU(       a9  [        R
                  R                  US[        R                  R                  5      $ [        R
                  R                  US5      $ UnUc@  U(       a  U =(       a    [        =(       d    [        nOU =(       a    [        =(       d    [        n[        R                  S:X  d  [        5       (       ah  U (       d  U(       a  [        [        SS5      nOSn[         (       a  SOSn[        R
                  R                  X$U[        5       -   5      n[        XX25      $ [        R                  S	:X  aH  U(       a   [        R
                  R                  US
5      $ [        R
                  R                  US
S5      $ [!        S[        R                   S35      e)a+  Return the directory containing the Python library (standard or
site additions).

If 'plat_specific' is true, return the directory containing
platform-specific modules, i.e. any module from a non-pure-Python
module distribution; otherwise, return the platform-shared library
directory.  If 'standard_lib' is true, return the directory
containing standard Python library modules; otherwise, return the
directory for site-specific modules.

If 'prefix' is supplied, use it instead of sys.base_prefix or
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
rP   z
lib-pythonrr   r?   
platlibdirlibrf   rg   r&   Libz<I don't know where Python installs its library on platform 'rA   )rT   r;   r<   r-   r   r    r*   majorrB   r.   EXEC_PREFIXrC   r   getattrr=   rv   r   )rF   rs   r+   ru   libdirri   rt   s          r   get_python_libr      sB    w3##f,>F77<<c6F6F6L6LMMww||FO44L~"7'7F;F"2{<fF	ww'XZZL S,6F F#*7GGLLBTBV1VW	,<HH	D77<<..77<<??$J277)STU
 	
r   c                      [         R                  S:H  =(       a$    [        S5      R                  [	        5       5        g  g)a  
Perform first-time customization of compiler-related
config vars on macOS. Use after a compiler is known
to be needed. This customization exists primarily to support Pythons
from binary installers. The kind and paths to build tools on
the user system may vary significantly from the system
that Python itself was built on.  Also the user OS
version and build tools may not support the same set
of CPU architectures for universal builds.
darwin_osx_supportN)r;   platform
__import__customize_compilerget_config_varsr6   r   r   _customize_macosr     s2     LLH N!;!N!N" r   c                 b   U R                   S;   d!  U R                   S:X  Ga  [        5       (       Ga}  [        5         [        SSSSSSS	S
S5	      u	  nnnnnnnnn	Un
S[        R
                  ;   aO  [        R
                  S   nS[        R
                  ;  a&  UR                  U5      (       a  X[        U5      S -   nUn[        R
                  R                  SU5      n[        R
                  R                  SU5      n[        R
                  R                  SU5      n[        R
                  R                  SUS-   5      n[        US5      n[        US5      n[        US5      n[        US5      n[        R
                  R                  SU
5      n
[        US5      n[        US5      n[        US5      n[        U
S5      n
[        US5      n[        US5      n[        R
                  R                  S
U5      nUS-   [        R
                  R                  SU	5      -   nUS-   U-   nUS-   U
-   nU R                  UUUS-   U-   UUS-   U-   UUUUUS9
  S[        R
                  ;   aA  U R                  R                  SS5      (       a   U R                  [        R
                  S   S9  Xpl        ggg)zDo any platform-specific customization of a CCompiler instance.

Mainly needed on Unix, so we can plug in the information that
varies across Unices and is stored in Python's Makefile.
)unixcygwinmingw32CCCXXCFLAGSCCSHAREDLDSHAREDLDCXXSHAREDSHLIB_SUFFIXARARFLAGSNCPPz -ELDCCXXFLAGS )
preprocessorcompilercompiler_socompiler_cxxcompiler_so_cxx	linker_solinker_so_cxx
linker_exelinker_exe_cxxarchiverRANLIBranlib)r   )compiler_typer   r   r   r   environr"   lenget
_add_flagsset_executablesexecutablesshared_lib_extension)r   cccxxcflagsccsharedldsharedldcxxsharedshlib_suffixarar_flagscxxflagsnewcccppr   cc_cmdcxx_cmds                   r   r   r   #  s    !33)+

 


	
 2::JJt$E+0C0CB0G0G !CGI#66BjjnnUC(::>>*h7jjnn]K@jjnnJ

 h- d3FC(h,::>>*h7 e4e$FE*h.h. e4ZZ^^D"%8bjjnnYAAcF")h&  x/ #cMH4% 	! 	
 rzz!h&:&:&>&>x&N&N$$BJJx,@$A(4%[ 1;+r   c                  ,    [         R                  " 5       $ )z2Return full pathname of installed pyconfig.h file.)rn   ro   r6   r   r   ro   ro   z      **,,r   c                  ,    [         R                  " 5       $ )zAReturn full pathname of installed Makefile from the Python build.)rn   get_makefile_filenamer6   r   r   r   r     r   r   c                 *    [         R                  " XS9$ )zParse a config.h-style file.

A dictionary containing name/value pairs is returned.  If an
optional dictionary is passed in as the second argument, it is
used instead of a new dictionary.
)vars)rn   parse_config_h)fpgs     r   r   r     s     ##B//r   z"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}c                    SSK Jn  U" U SSSSS9nUc  0 n0 n0 n UR                  5       nUc  Oo[        R	                  U5      nU(       aQ  UR                  SS5      u  pU	R                  5       n	U	R                  S	S
5      n
SU
;   a  XU'   O [        U	5      n	XU'   M  SnU(       Ga  [        U5       GHq  nX\   n[        R                  U5      =(       d    [        R                  U5      nU(       Ga.  UR                  S5      nSnX;   a  [        XH   5      nO{X;   a  SnOsU[        R                   ;   a  [        R                   U   nOKX;   a@  UR#                  S5      (       a  USS U;   a  S
nO$SU-   U;   a  SnO[        USU-      5      nOS
=XH'   nU(       a  XR%                  5       S nUSUR'                  5        W-   U-   nSU;   a  XU'   GM!   [        U5      nXU'   X\	 UR#                  S5      (       a   USS U;   a  USS nX;  a  XU'   GMc  GMf  GMi  GMl  GMo  X\	 GMt     U(       a  GM  UR)                  5         UR+                  5        H0  u  nn	[-        U	[        5      (       d  M  U	R                  5       UU'   M2     UR/                  U5        U$ ! [         a    U	R                  S	S5      XH'    GNf = f! [         a    UR                  5       XL'    Nf = f)zParse a Makefile-style file.

A dictionary containing name/value pairs is returned.  If an
optional dictionary is passed in as the second argument, it is
used instead of a new dictionary.
r   )TextFileTsurrogateescape)strip_commentsskip_blanks
join_lineserrorsNr   r:   z$$r8   $)r   LDFLAGSCPPFLAGSFPY_rQ   )distutils.text_filer   readline_variable_rxmatchgroupstripreplaceint
ValueErrorlist_findvar1_rxsearch_findvar2_rxstrr   r   r"   endstartcloseitems
isinstanceupdate)r   r   r   r   donenotdonelinemnvtmpvrenamed_variablesrC   valuefounditemafterks                     r   parse_makefiler     s    -	
 
B 	yDG
{{}<t$771a=DA	A99T2&Dd{
 AA
  G) 4 : MDME##E*Hl.A.A%.HAGGAJ9tw<D\!E"**_::a=D+u--$qr(>O2O!g- %  #4	?3%''DGd!%%'),E!+AGGI.5=Ee|(-/$'JE */J#M??511d12hBS6S#'8D#/-2T
  0 7T1 ( M] " 'b HHJ 

1aggiDG 
 HHTNHO " 3iic2DG3`  * 7).DJ7s$   J J?J<;J<?KKc                      [         R                  U 5      =(       d    [        R                  U 5      nU(       a>  UR                  5       u  p4U SU UR	                  UR                  S5      5      -   XS -   n O U $ M{  )a  Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
'string' according to 'vars' (a dictionary mapping variable names to
values).  Variables not present in 'vars' are silently expanded to the
empty string.  The variable values in 'vars' should not contain further
variable expansions; if 'vars' is the output of 'parse_makefile()',
you're fine.  Returns a variable-expanded version of 's'.
r   r   N)r   r   r   spanr   r   )sr   r   begr   s        r   expand_makefile_varsr     sn     "<l&9&9!&<JS!C488AGGAJ//!D'9AH r   c                      [         c=  [        R                  " 5       R                  5       q [        R
                  " [         5        U (       a%  U  Vs/ sH  n[         R                  U5      PM     sn$ [         $ s  snf )a  With no arguments, return a dictionary of all configuration
variables relevant for the current platform.  Generally this includes
everything needed to build extensions and install both pure modules and
extensions.  On Unix, this means every variable defined in Python's
installed Makefile; on Windows it's a much smaller set.

With arguments, return a list of values that result from looking up
each argument in the configuration variable dictionary.
)_config_varsrn   r   copyr   add_ext_suffixr   )argsrC   s     r   r   r   !  sY      002779L)8<t4ttLT"t4N,N4s   A7c                 v    U S:X  a  SSK nUR                  S[        S5        [        5       R	                  U 5      $ )zReturn the value of a single variable using the dictionary
returned by 'get_config_vars()'.  Equivalent to
get_config_vars().get(name)
SOr   Nz SO is deprecated, use EXT_SUFFIXr:   )warningswarnDeprecationWarningr   r   )rC   r   s     r   r_   r_   3  s4    
 t|8:LaP  &&r   r   typereturnc                 f    [         R                  R                  U S35      nU(       a  U  SU 3$ U $ )z
Add any flags from the environment for the given type.

type is the prefix to FLAGS in the environment key (e.g. "C" for "CFLAGS").
FLAGSr   )r   r   r   )r   r  flagss      r   r   r   ?  s4     JJNNdV5>*E!&eWAeW1E1r   )FN)FFNr   )G__doc__	functoolsr   r   rer;   rn   jaraco.functoolsr   compatr   r   r   utilr   builtin_module_namesrT   r    r`   r+   r-   exec_prefixr|   base_prefixr.   base_exec_prefixrB   r   abspathr5   
executablerm   getcwdr   r}   r4   r%   rC   r2   r7   r^   rh   abiflagsAttributeErrorr=   rK   rN   rZ   rU   rV   rW   rp   rv   r   	lru_cacher   r   ro   r   r   compiler   r   r   r   r   r   r   r_   r   r   r6   r   r   <module>r     sw  	  	  	 
  &  * 
00
0 
		#**	%ggs/ggs/77##C$8$89 
 RZZ'77??2::.D#EFL
~~wwrwws~~'FG yy{R C$'	G 77d?     -LY'I/  	ll*:2 2 2$ D.7+82
j  "T5n-
-
0 zz?@zz:;zz89m`2 O$	' 2c 2 2 2 2{  	 		s   5I& &I/.I/