
    -Ph                        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
 ddl	mZ ddlmZ dd	lmZmZ dd
lmZ ddlmZ ddlmZ ej        rddlmZ ddlmZ  ej        dd           G d de                      Zej         G d d                      Z ej         G d d                      Z! G d de          Z"e"ed<   dddddddd d!d"d#d$d%Z# G d& d'          Z$ G d( d)          Z%i d* e$d*d+gd,gg g -          d. e$d.d/gd0gd1gg -          d2 e$d2d3gd4gg g -          d5 e$d5d6gg g g -          d7 e$d7d8gd9gd:gg -          d; e$d;d<gg g g -          d= e$d=d>gg g g -          d? e$d?g g g g -          d@ e$d@dAgg g g -          dB e$dBdAgg g g -          dC e$dCdDgdEgg g -          dF e$dFg g g g -          dG e$dGdHgg g g -          dI e$dIg g g g -          dJ e$dJdKgg dLgg -          dM e$dMdNgg dLgg -          dO e$dOg g g g -          i dP e$dPg g g g -          dQ e$dQg g g g -          dR e$dRg g g g -          dS e$dSg g g g -          dT e$dTg g g g -          dU e$dUg g g g -          dV e$dVdWgg g g -          dX e$dXdYgg g g -          dZ e$dZg g g g -          d[ e$d[d\gg g g -          d] e$d]g g g g -          d^ e$d^g g g g -          d_ e$d_g g g g -          d` e$d`g g g g -          da e$dag g g g -          db e$dbg g g g -          dc e$dcg g g g -           e$ddg g g g -           e$dedfgdggg g -           e$dhdYgg g g -           e$didjdkgdldmgg g -           e$dndogdpgg g -           e$dqdrgg g g -           e$dsdYgg g g -           e$dtg g g g -           e$dug g g g -          dv	Z&dS )w    )annotationsNPath   )mlog)mesonlib)	OptionKey   )DependencyExceptionSystemDependency)packages)PkgConfigDependency)threads_factory)
Properties)EnvironmentF)eqorderc                      e Zd ZU ded<   dS )UnknownFileExceptionr   pathN)__name__
__module____qualname____annotations__     ]/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mesonbuild/dependencies/boost.pyr   r   P   s         JJJJJr   r   c                  &    e Zd ZddZddZddZdS )BoostIncludeDirr   r   version_intintc                    || _         || _        t          | j        dz            }t          | j        dz  dz            }t          | j        dz            }| d| d| | _        | d| | _        d S )Ni d   i  ._)r   r    r!   versionversion_lib)selfr   r    majorminorpatchs         r   __init__zBoostIncludeDir.__init__V   s    	&D$v-..T%+t344D$s*++11%11%11#--e--r   returnstrc                (    d| j          d| j         dS )Nz<BoostIncludeDir: z -- >)r&   r   r(   s    r   __repr__zBoostIncludeDir.__repr___   s    BDLBBdiBBBBr   otherobjectboolc                v    t          |t                    r| j        | j        f|j        |j        fk     S t          S N)
isinstancer   r    r   NotImplementedr(   r3   s     r   __lt__zBoostIncludeDir.__lt__b   s:    e_-- 	S$di0E4Euz3RRRr   N)r   r   r    r!   r-   r.   r3   r4   r-   r5   )r   r   r   r,   r2   r;   r   r   r   r   r   T   sT        . . . .C C C C     r   r   c                      e Zd ZddgZ ej        d          Z ej        d          Z ej        d          Zd$dZ	d%dZ
d&dZd&dZd'dZed%d            Zd(dZd(dZd)dZd*dZd+dZd,dZd-d Zd.d!Zd.d"Zd#S )/BoostLibraryFileboost_pythonboost_numpyz(boost_[a-zA-Z]+)([0-9]*)z^s?g?y?d?p?n?$z	^[0-9_]+$r   r   c                   || _         | j         j        | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _	        d| _
        d| _        d| _        | j                            d          }|d         | _        |dd          | _        d | j        D             | _        d | j        D             | _        d                    | j                  | _        | j                            d	          | _        | j        d         | _        | j                            d
          r| j        dd          | _        t-          | j                  dk    r1d                    | j        d         | j        d                   | _        | j        dv rd| _        n%| j        dv rd| _        nt1          | j                   | j                            d          r| j        d
k    rd| _        | j        dd          }|                                 r|                     |          }|sd S d| _        |D ]}|dk    rd| _        t-          |          dk    r|dd          dv r|| _        7t6          j                            |          r7d|v | _        d|v | _        d|v | _	        d|v | _
        d|v | _        d|v | _        t6          j                            |          r|| _        || _        d S )NF Tr$   r   r
   c                :    g | ]}|                                 |S r   isdigit.0xs     r   
<listcomp>z-BoostLibraryFile.__init__.<locals>.<listcomp>   s%    AAAqQYY[[AAAAr   c                :    g | ]}|                                 |S r   rE   rG   s     r   rJ   z-BoostLibraryFile.__init__.<locals>.<listcomp>   s%    EEEqEEEEr   -lib   r   z{}_{}>   dll.adll.libsodlldylib>   arM   boost_mt>   3264sgydpn)r   namestatictoolsetarchr'   rV   runtime_staticruntime_debugpython_debugdebugstlportdeprecated_iostreamssplitbasenamesuffixesvers_rawjoinnvsuffixnametagsmod_name
startswithlenformatr   is_python_libfix_python_namer?   reg_abi_tagmatchreg_ver_tag)r(   r   
name_partstagsis        r   r,   zBoostLibraryFile.__init__q   s   	IN	 	#"!
$)! Y__S))
"1"122AADMAAAEEDMEEE//++C00a(=##E** 	. M!""-DM t}""&~~dmA.>a@PQQD =FFFDKK]l**DKK&ty111 =##H-- 	 $-52H2HDK }QRR  	.''--D 	F  	! 	!ADyyQ1122,!6!6		!-33A66 
!&)Qh#%(AX"$'1H! AX
"ax,/1H))!-33A66 !#$   	! 	!r   r-   r.   c                :    d| j          d| j        dd| j         dS )Nz<LIB:  z<32r0   )abitagrp   r   r1   s    r   r2   zBoostLibraryFile.__repr__   s,    FFFdmFFF$)FFFFr   r3   r4   r5   c                r   t          |t                    r| j        | j        | j        | j        | j         | j         | j         | j	        | j
        | j        | j        | j        f|j        |j        |j        |j        |j         |j         |j         |j	        |j
        |j        |j        |j        fk     S t          S r7   )r8   r?   rp   r`   r'   rb   rV   rc   rf   rd   re   rg   rh   r_   r9   r:   s     r   r;   zBoostLibraryFile.__lt__   s    e-.. 	t{D,<diG!44J 2D4Ed7	 e.?H%"66K!4e6Hu9
  r   c                Z    t          |t                    r| j        |j        k    S t          S r7   )r8   r?   r_   r9   r:   s     r   __eq__zBoostLibraryFile.__eq__   s*    e-.. 	+9
**r   r!   c                *    t          | j                  S r7   )hashr_   r1   s    r   __hash__zBoostLibraryFile.__hash__   s    DIr   c                N   d}|| j         rdndz  }|| j        rdndz  }|dz  }|| j        rdndz  }|| j        rdndz  }|| j        rdndz  }|| j        rd	ndz  }|| j        rd
ndz  }|| j        rdndz  }|d| j        pdz   z  }|d| j	        pdz   z  }|d| j
        pdz   z  }|S )NrC   SrL   Mr}   rY   rZ   r[   r\   r]   r^   z????x_xx)r`   rV   rc   rd   re   rf   rg   rh   rb   ra   r'   )r(   r~   s     r   r~   zBoostLibraryFile.abitag   s   -###-)##c)#,5###5+4##4*3##3,##,.##3.2;##;#+e,,#,--#)3V44r   c                :     t           fddD                       S )Nc              3  L   K   | ]}j                             |          V  d S r7   r_   rq   rH   rI   r(   s     r   	<genexpr>z,BoostLibraryFile.is_boost.<locals>.<genexpr>   s3      LLq49''**LLLLLLr   	libboost_rU   anyr1   s   `r   is_boostzBoostLibraryFile.is_boost   s'    LLLL4KLLLLLLr   c                N     t           fdt          j        D                       S )Nc              3  L   K   | ]}j                             |          V  d S r7   )rp   rq   r   s     r   r   z1BoostLibraryFile.is_python_lib.<locals>.<genexpr>   s3      [[14=++A..[[[[[[r   )r   r?   boost_python_libsr1   s   `r   rt   zBoostLibraryFile.is_python_lib   s*    [[[[8H8Z[[[[[[r   rz   T.List[str]c                .   g }t           j                            | j                  }|                    d          }|                    d          dfd}|D ]}|                    d          r ||dd                     +|                                r ||           Kt          |          d	k    rL|d
                                         r2|d                                         r|d         dk    r ||           ||gz  }|z   | _        |S )Nr
   r   new_versr.   r-   Nonec                    |                      dd          } |                      dd          } |                                 sd S t          |           t                    k    r| d S d S )Nr%   rC   r$   )replacerF   rr   )r   cur_verss    r   update_versz5BoostLibraryFile.fix_python_name.<locals>.update_vers   sn    ''R00H''R00H##%% 8}}s8}},,# -,r   pyrN   r   r$   )r   r.   r-   r   )r?   reg_python_mod_splitrw   rp   grouprq   rF   rr   )r(   rz   
other_tagsm_curcur_namer   r{   r   s          @r   ru   z BoostLibraryFile.fix_python_name   s)    #%
 !5;;DMJJ;;q>>;;q>>	$ 	$ 	$ 	$ 	$ 	$  	" 	"A||D!! "AabbE"""" "AQ11AaDLLNNqts{{Aqc!

 8+r   rp   c                   | j         |k    rdS |                                 sdS t          j                            | j                   }t          j                            |          }|r|sdS |                    d          |                    d          k    rdS |                    d          }|                    d          }|sd}|                    |          S )NTFr
   r   2)rp   rt   r?   r   rw   r   rq   )r(   rp   r   m_argr   arg_verss         r   mod_name_matchesz!BoostLibraryFile.mod_name_matches  s    =H$$4!!## 	5 5;;DMJJ 5;;HEE 	E 	5;;q>>U[[^^++5;;q>>;;q>>  	H""8,,,r   r'   c                .    | j         r|sdS | j         |k    S NT)r'   )r(   r'   s     r   version_matchesz BoostLibraryFile.version_matches(  s'     	{ 	4;..r   rb   c                .    | j         r|sdS | j         |k    S r   )rb   )r(   rb   s     r   arch_matcheszBoostLibraryFile.arch_matches.  s%    y 	 	4yD  r   vscrtc                    |sdS |dv r| j          o| j         S |dv r| j          o| j        S |dv r| j         s| j         o| j         S |dv r| j         s| j         o| j        S t          j        d| dd           dS )	NT>   -MD/MD>   -MDd/MDd>   -MT/MT>   -MTd/MTdzBoost: unknown vscrt tag zR. This may cause the compilation to fail. Please consider reporting this as a bug.)once)rc   rd   r`   r   warning)r(   r   s     r   vscrt_matcheszBoostLibraryFile.vscrt_matches4  s     	4N""**E43E/EE&&&**At/AAn$$':t{?VDDV@VV&&&':t{?R@RR  K  K  K  K  RV  	W  	W  	W  	Wtr   c                    g }| j         t          v rJt          | j                  }| j        r||j        z  }n
||j        z  }| j        r||j        z  }n
||j        z  }|S r7   )rp   boost_librariesr`   sharedrV   multisingle)r(   argslibdefs      r   get_compiler_argsz"BoostLibraryFile.get_compiler_argsD  sm    =O++$T]3F{ &%%w &$%r   c                6    | j                                         gS r7   r   as_posixr1   s    r   get_link_argszBoostLibraryFile.get_link_argsR  s    	""$$%%r   N)r   r   r<   r=   )r-   r!   )r-   r5   )rz   r   r-   r   )rp   r.   r-   r5   )r'   r.   r-   r5   )rb   r.   r-   r5   )r   r.   r-   r5   r-   r   )r   r   r   r   recompiler   rv   rx   r,   r2   r;   r   r   propertyr~   r   rt   ru   r   r   r   r   r   r   r   r   r   r?   r?   g   s        (7%2:&BCC"*.//K"*\**KH! H! H! H!TG G G G   "   
       X M M M M\ \ \ \       D- - - -0/ / / /! ! ! !       & & & & & &r   r?   c                       e Zd Zd* fdZd+dZd,dZd-dZd.dZd/dZd0dZ	d1dZ
d2d!Zd3d"Zd4d#Zd4d$Zd5d'Zd6d)Z xZS )7BoostDependencyenvironmentr   kwargsT.Dict[str, T.Any]r-   r   c                    t                                          d||d           |j        j                            t          d                    }t          |t                    sJ |                    d           _	        |
                    dd          dk     _        d  _        d|v  _        t          j        |d	           _         j        D ]J}t          |t                    st#          d
          |                    d          rt#          d          Kg  _        g  _        d j        v r2                     t+          | j        i                     s	d _        d S |j         j                 j         _        t6          
                     j        d            _         j        j         j                 }t=           fddD                       r                     |           d S                                    d S )Nboostcpp)language	buildtyperf   	threadingr   r`   modulesz&Boost module argument is not a string.rU   z6Boost modules must be passed without the boost_ prefixthreadFc              3  J   K   | ]}|j         j        j                 v V  d S r7   )env
propertiesfor_machiner   s     r   r   z+BoostDependency.__init__.<locals>.<genexpr>w  sM       G GaqDH'(899 G G G G G Gr   )boost_includedirboost_librarydir
boost_root)!superr,   coredataoptstoreget_value_forr	   r8   r.   rq   rf   getmultithreadingr   explicit_staticr   extract_as_listr   r   modules_foundmodules_missing_add_sub_dependencyr   r   is_foundmachines
cpu_familyrb   boost_arch_mapr   r   r   detect_boost_machine_filedetect_roots)r(   r   r   r   r{   props	__class__s   `     r   r,   zBoostDependency.__init__V  s    +vFFF(1??	+@V@VWW	)S)))))))'22
$jjg>>'I,0'61 %-$<VY$O$O 	d 	dAa%% T)*RSSS||H%% d)*bcccd +-,. t|##++OKIY[],^,^__  %  ()9:E	"&&ty$77	 #D$45 G G G GEG G G G G 	**5111F 	r   rootsT.List[Path]
use_systemr5   c                z   t          t          j        |                    }|D ]}t          j        d|                                            |                     |          }t          |d          }|sT|                     ||          }| 	                    ||          | _
        | j
        r
|| _         d S d S )NzChecking potential boost root T)reverse)listr   
OrderedSetr   rf   r   detect_inc_dirssorteddetect_lib_dirs	run_checkr   r   )r(   r   r   jinc_dirslib_dirss         r   check_and_set_rootsz#BoostDependency.check_and_set_roots  s    X(//00 	 	AJF

FFGGG++A..Hh555H  ++Az::H NN8X>>DM} "#	 	r   r   'Properties'c                :   |                     d          }|t          |t                    sJ |                     d          }|t          |t                    sJ |r|rt          |          }t          |          }|                                r|                                st          d          t          j        d           t          j        d|            t          j        d|            |                     ||          S |s|rt          d          |                     d	          }|sJ t          j
        |          }d
 |D             }|r(t          d |D                       rt          d          |                     |d           dS )zDetect boost with values in the machine file or environment.

        The machine file values are defaulted to the environment values.
        r   Nr   zVPaths given for boost_includedir and boost_librarydir in machine file must be absoluteTrying to find boost with:  - boost_includedir =   - boost_librarydir = zdBoth boost_includedir *and* boost_librarydir have to be set in your machine file (one is not enough)r   c                ,    g | ]}t          |          S r   r   rG   s     r   rJ   z=BoostDependency.detect_boost_machine_file.<locals>.<listcomp>  s    ,,,Qa,,,r   c              3  @   K   | ]}|                                  V  d S r7   )is_absoluterG   s     r   r   z<BoostDependency.detect_boost_machine_file.<locals>.<genexpr>  s-      <<Q]]__,<<<<<<r   z6boost_root path given in machine file must be absoluteFr   )r   r8   r.   r   r	  r   r   rf   detect_split_rootr   stringlistifyr   r  )	r(   r   incdirlibdirinc_dirlib_dirrootdir	raw_pathspathss	            r   r   z)BoostDependency.detect_boost_machine_file  s    -..~FC!8!8~~~-..~FC!8!8~~~ 	Nf 	N6llG6llG&&(( D0C0C0E0E D)  +C  D  D  DJ3444J:::;;;J:::;;;))'7;;; 	Nv 	N%  'M  N  N  N))L))*733	,,),,, 	`S<<e<<<<< 	`%&^___  5 99999r   r   T.List[BoostIncludeDir]r   c                   t          j        d                    d |D                                  t          j        d                    d |D                                  g }|D ]2}|                     |          }|rt          j        d|             n3t	          t          |                    }d | j        D             }|D ]}t          j        d|j         d|j                    | 	                    ||j
                  }t          j        d	           |D ]}t          j        d
|            g }	g }
|D ]0}d}|D ]!}|                    |          r
|
|gz  }
d} n"|s|	|gz  }	1t          j        d           g }g }|
D ]|}|                                }|                                }t          j        d                    |j        t          |          t          |                               ||z  }||z  }}t!          t#          j        |                    }t!          t#          j        |                    }d |
D             | _        d | j        D             | _        t	          t          | j                            | _        |	| _        d | j        D             | _        t	          t          | j                            | _        |	s|j        | _        d|j                                        z   g| _        | xj        |z  c_        | xj        |                                 z  c_        t!          t#          j        | j                            | _        || _        t          j        d| j                    t          j        d| j                     dS t          j        d           |	D ]}t          j        d
|            dS )Nz  - potential library dirs: {}c                6    g | ]}|                                 S r   )r   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s     ;[;[;[QAJJLL;[;[;[r   z  - potential include dirs: {}c                @    g | ]}|j                                         S r   r   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s%    ;`;`;`RSAFOO<M<M;`;`;`r   z  - found boost library dir: c                    g | ]}d |z   S )rU   r   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s    666A8a<666r   z  - found boost z include dir: z  - filtered library list:z    - FTz
  - found:z    - {:<24} link={} comp={}c                    g | ]	}|j         
S r   )rp   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s    !G!G!G!*!G!G!Gr   c                "    g | ]}|d d         S    Nr   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s     !D!D!DA!ABB%!D!D!Dr   c                "    g | ]}|d d         S r  r   rG   s     r   rJ   z-BoostDependency.run_check.<locals>.<listcomp>  s     #H#H#HaAabbE#H#H#Hr   z-Iz  - final compile args: z  - final link args:    z  - NOT found:)r   rf   rs   detect_librariesr   setr   r&   r   filter_librariesr'   r   r   r   rp   r.   r   r   r   r   r   r   compile_args_extra_compile_args	link_args)r(   r   r   libsr{   r   incf_libsr   	not_foundselected_modulesmodfoundl	comp_argsr#  c_argsl_argss                     r   r   zBoostDependency.run_check  s:   
3::;[;[RZ;[;[;[\\]]]
3::;`;`W_;`;`;`aabbb *, 	 	A((++D 
>1>>???  c$ii  66666 9	+ 9	+CJO#+OOSXOOPPP**4AAFJ3444 ) )
<A<<(((( &(I9; ' '  A))#.. (QC/( $  '#&I J|$$$%'I%'I% $ $,,..**
9@@SQW[[Z]^dZeZeffgggV#	V#		X0;;<<IX0;;<<I!G!G6F!G!G!GD!D!D1C!D!D!DD!'D,>(?(?!@!@D#,D #H#H43G#H#H#HD #)#d.B*C*C#D#DD   	"{%)CH,=,=,?,?%?$@!!!Y.!!!!T%=%=%?%??!!$()<T=N)O)O$P$P!!*
Id6GIIJJJ
FdnFFGGGtt J'(((  + +
>C>>****+ ur   rootr   c                `    g }|dz  }||dz  gz  }||dz  gz  }|                                 rO|                                D ]:}|                                 r|j                            d          s1||dz  gz  };d |D             }d |D             }d |D             } fd|D             S )Nincluder   zboost-c                :    g | ]}|                                 |S r   is_dirrG   s     r   rJ   z3BoostDependency.detect_inc_dirs.<locals>.<listcomp>  %    :::Aqxxzz:a:::r   c                    g | ]}|d z  S )version.hppr   rG   s     r   rJ   z3BoostDependency.detect_inc_dirs.<locals>.<listcomp>  s    <<<Aa-'<<<r   c                :    g | ]}|                                 |S r   )existsrG   s     r   rJ   z3BoostDependency.detect_inc_dirs.<locals>.<listcomp>  r5  r   c                :    g | ]}                     |          S r   ) _include_dir_from_version_headerr   s     r   rJ   z3BoostDependency.detect_inc_dirs.<locals>.<listcomp>  s'    MMMQ55a88MMMr   )r4  iterdirr_   rq   )r(   r/  
candidatesinc_rootr{   s   `    r   r   zBoostDependency.detect_inc_dirs  s    #%
)#tg~&&
x')**
?? 	,%%'' , ,xxzz ):):8)D)D q7{m+

:::::
<<<<<
:::::
MMMM*MMMMr   c                   |rj| j                             | j                  }d |D             }d |D             }fd|D             }t          t	          j        |                    }|r|S g }g }                                D ]6}|                                r |j        	                    d          r||gz  }7|D ]M}|                                D ]6}|                                r |j        
                    d          r||gz  }7N| j        s||z   S ddgdg||z   }	fd	|	D             }
g }d| j        v rfd
|	D             }nd| j        v rfd|	D             }t          |          t          |
          z   S )Nc                ,    g | ]}t          |          S r   r   rG   s     r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>  s    :::q477:::r   c                ^    g | ]*}|                                 |                                +S r   )r9  resolverG   s     r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>  s-    JJJ1qxxzzJ199;;JJJr   c                >    g | ]}t          j        |          |S r   )r   path_is_in_root)rH   rI   r/  s     r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>  s,    WWWX5MaQU5V5VW1WWWr   rM   z
-linux-gnurW   i386rX   c                R    g | ]"t          fd z   D                        #S )c              3  *   K   | ]}|j         v V  d S r7   r_   rH   r[   rI   s     r   r   z=BoostDependency.detect_lib_dirs.<locals>.<listcomp>.<genexpr>:  s)      1c1c!!qv+1c1c1c1c1c1cr   r   )rH   rI   arch_list_32arch_list_64s    @r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>:  sB    dddc1c1c1c1c|VbGb1c1c1c.c.cd1dddr   c                L    g | ]t          fd D                        S )c              3  *   K   | ]}|j         v V  d S r7   rH  rI  s     r   r   z=BoostDependency.detect_lib_dirs.<locals>.<listcomp>.<genexpr>>  )      7Z7ZQV7Z7Z7Z7Z7Z7Zr   r   )rH   rI   rJ  s    @r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>>  <    [[[1C7Z7Z7Z7Z\7Z7Z7Z4Z4Z[Q[[[r   c                L    g | ]t          fd D                        S )c              3  *   K   | ]}|j         v V  d S r7   rH  rI  s     r   r   z=BoostDependency.detect_lib_dirs.<locals>.<listcomp>.<genexpr>@  rN  r   r   )rH   rI   rK  s    @r   rJ   z3BoostDependency.detect_lib_dirs.<locals>.<listcomp>@  rO  r   )clib_compilerget_library_dirsr   r   r   r   r<  r4  r_   rq   endswithrb   r   )r(   r/  r   system_dirs_tsystem_dirsdirssubdirsr{   r   raw_listno_archmatching_archrJ  rK  s    `          @@r   r   zBoostDependency.detect_lib_dirs  s     	# .??IIM::M:::KJJJJJKWWWWkWWWKx2;??@@K #""   " 	 	Axxzz af//66   	# 	#AYY[[ # #88:: #!&//,"?"? #sNG# y 	"'>!f~v'>dddddhddd&(49[[[[[[[MMTY[[[[[[[Mm$$vg66r   r$  T.List[BoostLibraryFile]lib_versr.   c                    d	  j         j        j                            d          }t	          |t
                    sJ  j         j        j                            d          }t	          |t
                    sJ  j                            ||          d         n# t          t          t          f$ r Y nw xY w fd|D             } fd|D             } j         j         j                                                 sfd|D             } fd|D             }fd	|D             }d
 |D             } j        sd |D             }|sg S |d         j        fd|D             }|S )NrC   b_vscrtr   r   c                B    g | ]}|j         j         k    sj        |S r   )r`   r   r   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>V  s/    WWWa18t{#:#:$BV#:#:#:#:r   c                4    g | ]}|j         j        k    |S r   )rV   r   r   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>W  s(    ???a144+>#>#>#>#>#>r   c                >    g | ]}|                               |S r   )r   )rH   rI   r]  s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>Y  s,    CCC!q'8'8'B'BCACCCr   c                H    g | ]}|                     j                  |S r   )r   rb   r   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>Z  s,    ===a1>>$)#<#<====r   c                >    g | ]}|                               |S r   )r   )rH   rI   r   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>[  s*    :::a1??5#9#9::::r   c                (    g | ]}|j         d k    |S )rR   )rn   rG   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>\  s$    777a1:#6#6#6#6#6r   c                     g | ]}|j         	|S r   )rf   rG   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>a  s    333!173A333r   c                *    g | ]}|j         k    |S r   )r~   )rH   rI   r~   s     r   rJ   z4BoostDependency.filter_libraries.<locals>.<listcomp>h  s%    666a18v#5#5#5#5#5r   )r   r   r   	get_valuer8   r.   rR  get_crt_compile_argsKeyError
IndexErrorAttributeErrorr   r   
is_openbsdrf   r~   )r(   r$  r]  crt_valr   r~   r   s   ` `  @@r   r   z BoostDependency.filter_librariesD  s   	h'0::9EEGgs+++++)2<<[IIIi-----&;;GYOOPQREE*n5 	 	 	D	 XWWW4WWW????4???x !12==?? 	DCCCCtCCCD====4===::::4:::774777 z 	433t333D  	Ia66664666s   BB   B:9B:r  c                   t                      }|                                D ]ˊ                                st          fddD                       s3j                            d          rN	 |                    t                                                               # t          $ r;}t          j        d                    |j        j                             Y d }~d }~ww xY wd |D             S )Nc              3  L   K   | ]}j                             |          V  d S r7   r   )rH   rI   r{   s     r   r   z3BoostDependency.detect_libraries.<locals>.<genexpr>q  s3      MMqv((++MMMMMMr   r   z.pdbz3Boost: ignoring unknown file {} under lib directoryc                :    g | ]}|                                 |S r   )r   rG   s     r   rJ   z4BoostDependency.detect_libraries.<locals>.<listcomp>}  s%    000a1::<<0000r   )r  r<  is_filer   r_   rT  addr?   rB  r   r   r   rs   r   )r(   r  r$  er{   s       @r   r  z BoostDependency.detect_librariesl  s   (+!! 	h 	hA99;; MMMM5LMMMMM  vv&& h)!))++667777' h h hRYYZ[Z`Zeffggggggggh 1040000s   34B((
C-21C((C-r  r  c                    d }|dz  |dz  dz  fD ]-}|                                 r|                     |          } n.|s	d| _        d S |                     |g|g          | _        d S )Nr7  r   F)rr  r;  r   r   )r(   r  r  boost_inc_dirr   s        r   r  z!BoostDependency.detect_split_root  s    M)7W+<}+LM 	 	Ayy{{  $ E Ea H H  	!DMF	BBr   c                   g }	 t          d| j        ddi          }|                                r|                    d          }|                    d          }|r|rt	          j        d           t	          j        dt          |                      t	          j        d	t          |                      |                     t          |          t          |                     d S |                    d
          }|r|t          |          gz  }n# t          $ r Y nw xY wd | j	        
                                D             }d |D             }d |D             }||z  }| j        j        | j                 }|                                rt          d          }|                                r||gz  }t          d          }	t          d          }
g }|	                                r|g |	                                z  }|
                                r|g |
                                z  }|d |D             z  }ng }|                                r1|                    t          d          t          d          g           |t          d          gz  }|t          d          gz  }|t          d          gz  }d |D             }d |D             }||z  }|                     |d           d S )Nr   requiredFr  )	pkgconfig
includedirr  r  r  prefixc                ,    g | ]}t          |          S r   r   rG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  s    TTTT!WWTTTr   c                D    g | ]}|                                 |j        S r   )r9  parentrG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  s'    ???!AHHJJ?QX???r   c                6    g | ]}|                                 S r   rB  rG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  s     444QQYY[[444r   zC:/BoostzC:/Program Files/boostzC:/localc                    g | ]D}|j                                                             d           .|                                B|ES )r   )r_   lowerrq   r4  rG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  sG    aaaAqv||~~/H/H/Q/QaVWV^V^V`V`aaaaar   z/opt/homebrew/z/usr/local/opt/boostz
/opt/localz
/usr/localz/usrc                :    g | ]}|                                 |S r   r3  rG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  s%    000QXXZZ01000r   c                6    g | ]}|                                 S r   r  rG   s     r   rJ   z0BoostDependency.detect_roots.<locals>.<listcomp>  s     ,,,1199;;,,,r   Tr
  )r   r   r*  get_variabler   rf   r   r  r   rR  get_default_include_dirsr   r   
is_windowsr4  r<  	is_darwinextendr  )r(   r   boost_pcboost_lib_dirrv  r   	inc_pathsmc_root
prog_fileslocal_boostr=  tmps                r   r   zBoostDependency.detect_roots  sX    	*7DHz5>QRRH~~ 4 ( 5 5 5 I I ( 5 5 5 M M  
4] 
4J;<<<JNm9L9LNNOOOJNm9L9LNNOOO**4+>+>]@S@STTTF!)!6!6!6!J!JJ! 4$z"2"2!33" 	 	 	D	 UTd&8&Q&Q&S&STTT	??y???	44)444	Hd./<<>> "	*%%F}} "&! 677Jz**K')J  "" 65
 2 2 4 455
!!## 76 3 3 5 566
aaaaaaEE "C {{}} 

)**/00    D&&''CD&&''CDLL>!C 10c000C,,,,,CSLE  4 88888s   C(D .+D 
D'&D'c                    d}| j         r |dd                    | j                   z   z  }| j        r'|r|dz  }|dd                    | j                  z   z  }|S )NrC   zfound: z, z | z	missing: )r   rm   r   )r(   ress     r   log_detailszBoostDependency.log_details  sp     	=9tyy);<<<<C 	A u;4+?!@!@@@C
r   c                F    | j         r| j                                         S dS )NrC   )r   r   r1   s    r   log_infozBoostDependency.log_info  s%    ? 	.?++---rr   hfiler   c                b   |                                 sJ |                    d          }t          j        d|          }|s2t	          j        d|            t          |j        d         d          S t          |j        d         t          |	                    d                              S )Nzutf-8)encodingz"#define\s+BOOST_VERSION\s+([0-9]+)z+Failed to extract version information from r
   r   )
r9  	read_textr   searchr   rf   r   parentsr!   r   )r(   r  rawr  s       r   r;  z0BoostDependency._include_dir_from_version_header  s     ||~~oowo//I;SAA 	8JLULLMMM"5=#3Q777u}Q/QWWQZZAAAr   r   c                    dgS )Nz-DBOOST_ALL_NO_LIBr   r1   s    r   r"  z#BoostDependency._extra_compile_args  s    $%%r   )r   r   r   r   r-   r   )r   r   r   r5   r-   r   )r   r  r-   r   )r   r  r   r   r-   r5   )r/  r   r-   r  )r/  r   r   r5   r-   r   )r$  r\  r]  r.   r-   r\  )r  r   r-   r\  )r  r   r  r   r-   r   )r-   r   r<   )r  r   r-   r   r   )r   r   r   r,   r  r   r   r   r   r   r  r  r   r  r  r;  r"  __classcell__)r   s   @r   r   r   U  s[       ' ' ' ' ' 'R   $$: $: $: $:LL L L L\N N N N -7 -7 -7 -7^& & & &P1 1 1 1&
C 
C 
C 
CD9 D9 D9 D9L      

B 
B 
B 
B& & & & & & & &r   r   r   a64a32i64m32m64p32p64s32s64x32x64)aarch64arcarmia64mipsmips64ppcppc64sparcsparc64x86x86_64c                      e Zd Zd
dZd	S )BoostLibraryr_   r.   r   r   r`   r   r   c                L    || _         || _        || _        || _        || _        d S r7   r_   r   r`   r   r   )r(   r_   r   r`   r   r   s         r   r,   zBoostLibrary.__init__  s)    	


r   N)
r_   r.   r   r   r`   r   r   r   r   r   r   r   r   r,   r   r   r   r  r    s(             r   r  c                      e Zd Zd	dZdS )
BoostModuler_   r.   keydescr$  r   c                >    || _         || _        || _        || _        d S r7   )r_   r  r  r$  )r(   r_   r  r  r$  s        r   r,   zBoostModule.__init__  s"    					r   N)r_   r.   r  r.   r  r.   r$  r   r  r   r   r   r  r    s(             r   r  boost_atomicz-DBOOST_ATOMIC_DYN_LINK=1z-DBOOST_ATOMIC_STATIC_LINK=1r  boost_chronoz-DBOOST_CHRONO_DYN_LINK=1z-DBOOST_CHRONO_STATIC_LINK=1z-DBOOST_CHRONO_THREAD_DISABLEDboost_containerz-DBOOST_CONTAINER_DYN_LINK=1z-DBOOST_CONTAINER_STATIC_LINK=1boost_contextz-DBOOST_CONTEXT_DYN_LINK=1boost_contractz-DBOOST_CONTRACT_DYN_LINKz-DBOOST_CONTRACT_STATIC_LINKz -DBOOST_CONTRACT_DISABLE_THREADSboost_coroutinez-DBOOST_COROUTINES_DYN_LINK=1boost_date_timez-DBOOST_DATE_TIME_DYN_LINK=1boost_exceptionboost_fiberz-DBOOST_FIBERS_DYN_LINK=1boost_fiber_numaboost_filesystemz-DBOOST_FILESYSTEM_DYN_LINK=1z -DBOOST_FILESYSTEM_STATIC_LINK=1boost_graphboost_iostreamsz-DBOOST_IOSTREAMS_DYN_LINK=1boost_locale	boost_logz-DBOOST_LOG_DYN_LINK=1z-DBOOST_LOG_NO_THREADSboost_log_setupz-DBOOST_LOG_SETUP_DYN_LINK=1boost_math_c99boost_math_c99fboost_math_c99lboost_math_tr1boost_math_tr1fboost_math_tr1l	boost_mpiboost_nowidez-DBOOST_NOWIDE_DYN_LINK=1boost_prg_exec_monitorz-DBOOST_TEST_DYN_LINK=1boost_program_optionsboost_randomz-DBOOST_RANDOM_DYN_LINKboost_regexboost_serializationboost_stacktrace_addr2lineboost_stacktrace_backtraceboost_stacktrace_basicboost_stacktrace_noopboost_stacktrace_windbgboost_stacktrace_windbg_cachedboost_systemz-DBOOST_SYSTEM_DYN_LINK=1z-DBOOST_SYSTEM_STATIC_LINK=1boost_test_exec_monitorboost_threadz-DBOOST_THREAD_BUILD_DLL=1z-DBOOST_THREAD_USE_DLL=1z-DBOOST_THREAD_BUILD_LIB=1z-DBOOST_THREAD_USE_LIB=1boost_timerz-DBOOST_TIMER_DYN_LINK=1z-DBOOST_TIMER_STATIC_LINK=1boost_type_erasurez-DBOOST_TYPE_ERASURE_DYN_LINKboost_unit_test_framework
boost_waveboost_wserialization)	r  r  r  r  r  r  r  r  r  )'
__future__r   r   dataclasses	functoolstypingTpathlibr   rC   r   r   optionsr	   baser   r   detectr   ry  r   miscr   TYPE_CHECKING	envconfigr   r   r   	dataclass	Exceptionr   total_orderingr   r?   r   r   r  r  r   r   r   r   <module>r     s
   # " " " " " 				                                     7 7 7 7 7 7 7 7       * * * * * * ! ! ! ! ! !? *&&&&&&))))))r %u---    9   .-        $ k& k& k& k& k& k& k& k&ZY& Y& Y& Y& Y&& Y& Y& Y&v $ 
  0              nLL+,./  n LL+,./01  n ||./12  n, \\,-  -n: ll+,./23  ;nH ||/0  InV ||./  Wnd ||  enr <<+,  sn@ +,  AnN /023  On\ <<  ]nj ||./  knx LL  ynF ()()  GnT ||./()  Unb ll  cn np ||  qn~ ||  nL ll  MnZ ||  [nh ||  inv   wnD LL+,  EnR ll%)*  Sn` \\$  ann LL)*  on| <<  }nJ <<"  KnX !,,)# # #Ynf !,,)# # #gnt ll%  unB \\$  CnP ||&     Qn n^ '3l-' ' ' !L+,./    ,|&)*      !L,.HI,.HI    <*+-.   ',!/0   ".()*" " " ,   )L#  O	n n nr   