403Webshell
Server IP : 216.92.14.13  /  Your IP : 216.73.216.171
Web Server : Apache
System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : rmlac2fmr ( 1040637)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/scons/SCons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/scons/SCons/PathList.pyc
�
�b3Qc@s�dZdZddlZddlZddlZddlZdZdZdZ	d�Z
defd	��YZd
efd��YZ
e
�jZ[
dS(s7src/engine/SCons/PathList.py  2013/03/03 09:48:35 garyos1SCons.PathList

A module for handling lists of directory paths (the sort of things
that get set as CPPPATH, LIBPATH, etc.) with as much caching of data and
efficiency as we can while still keeping the evaluation delayed so that we
Do the Right Thing (almost) regardless of how the variable is specified.

i����NiiicCsjy
|j}WnMtk
r\t|tjj�sDtjj|�rM|}qft|�}n
X|�}|S(s�
    This is the "string conversion" routine that we have our substitutions
    use to return Nodes, not strings.  This relies on the fact that an
    EntryProxy object has a get() method that returns the underlying
    Node that it wraps, which is a bit of architectural dependence
    that we might need to break or modify in the future in response to
    additional requirements.
    (tgettAttributeErrort
isinstancetSConstNodetUtiltis_Sequencetstr(tobjRtresult((s /usr/lib/scons/SCons/PathList.pyt	node_conv1s	

'		t	_PathListcBs2eZdZd�Zd�Zd�Zd�ZRS(s$
    An actual PathList object.
    cCs�tjj|�r'|jtj�}ntjj|�sE|g}ng}xo|D]g}y|jd�}Wntt	fk
r�t
}nX|dkr�t}nt}|j
||f�qRWt|�|_dS(s�
        Initializes a PathList object, canonicalizing the input and
        pre-processing it for quicker substitution later.

        The stored representation of the PathList is a list of tuples
        containing (type, value), where the "type" is one of the TYPE_*
        variables defined above.  We distinguish between:

            strings that contain no '$' and therefore need no
            delayed-evaluation string substitution (we expect that there
            will be many of these and that we therefore get a pretty
            big win from avoiding string substitution)

            strings that contain '$' and therefore need substitution
            (the hard case is things like '${TARGET.dir}/include',
            which require re-evaluation for every target + source)

            other objects (which may be something like an EntryProxy
            that needs a method called to return a Node)

        Pre-identifying the type of each element in the PathList up-front
        and storing the type in the list of tuples is intended to reduce
        the amount of calculation when we actually do the substitution
        over and over for each target.
        t$i����N(RRt	is_StringtsplittostpathsepRtfindRt	TypeErrortTYPE_OBJECTtTYPE_STRING_NO_SUBSTtTYPE_STRING_SUBSTtappendttupletpathlist(tselfRtpltptindexttype((s /usr/lib/scons/SCons/PathList.pyt__init__Is

	cCs
t|j�S(N(tlenR(R((s /usr/lib/scons/SCons/PathList.pyt__len__wscCs|j|S(N(R(Rti((s /usr/lib/scons/SCons/PathList.pyt__getitem__ysc	Cs�g}x�|jD]�\}}|tkr�|j|d|d|dt�}tjj|�rw|jtjj|��q�|r�|j	|�q�q|t
kr�t|�}|r�|j	|�q�q|r|j	|�qqWt|�S(s�
        Performs construction variable substitution on a pre-digested
        PathList for a specific target and source.
        ttargettsourcetconv(RRtsubstR
RRRtextendtflattenRRR(RtenvR#R$R	Rtvalue((s /usr/lib/scons/SCons/PathList.pyt
subst_path{s 	(t__name__t
__module__t__doc__RR R"R+(((s /usr/lib/scons/SCons/PathList.pyREs
	.		t
PathListCachecBsfeZdZejjr'ejjZngZd�Z	d�Z
ejejjde
��d�Z
RS(s�
    A class to handle caching of PathList lookups.

    This class gets instantiated once and then deleted from the namespace,
    so it's used as a Singleton (although we don't enforce that in the
    usual Pythonic ways).  We could have just made the cache a dictionary
    in the module namespace, but putting it in this class allows us to
    use the same Memoizer pattern that we use elsewhere to count cache
    hits and misses, which is very valuable.

    Lookup keys in the cache are computed by the _PathList_key() method.
    Cache lookup should be quick, so we don't spend cycles canonicalizing
    all forms of the same lookup key.  For example, 'x:y' and ['x',
    'y'] logically represent the same list, but we don't bother to
    split string representations and treat those two equivalently.
    (Note, however, that we do, treat lists and tuples the same.)

    The main type of duplication we're trying to catch will come from
    looking up the same path list from two different clones of the
    same construction environment.  That is, given
    
        env2 = env1.Clone()

    both env1 and env2 will have the same CPPPATH value, and we can
    cheaply avoid re-parsing both values of CPPPATH by using the
    common value from this cache.
    cCs
i|_dS(N(t_memo(R((s /usr/lib/scons/SCons/PathList.pyR�scCs1tjj|�r-ttjj|��}n|S(sf
        Returns the key for memoization of PathLists.

        Note that we want this to be pretty quick, so we don't completely
        canonicalize all forms of the same list.  For example,
        'dir1:$ROOT/dir2' and ['$ROOT/dir1', 'dir'] may logically
        represent the same list if you're executing from $ROOT, but
        we're not going to bother splitting strings into path elements,
        or massaging strings into Nodes, to identify that equivalence.
        We just want to eliminate obvious redundancy from the normal
        case of re-using exactly the same cloned value for a path.
        (RRRRR((RR((s /usr/lib/scons/SCons/PathList.pyt
_PathList_key�s
tPathListcCs�|j|�}y|jd}Wn$tk
rFi}||jd<n!Xy||SWntk
rfnXt|�}|||<|S(s�
        Returns the cached _PathList object for the specified pathlist,
        creating and caching a new object as necessary.
        R2(R1R0tKeyErrorR(RRt	memo_dictR	((s /usr/lib/scons/SCons/PathList.pyR2�s


(R,R-R.RtMemoizetuse_memoizertMemoized_Metaclasst
__metaclass__tmemoizer_countersRR1Rt	CountDictR2(((s /usr/lib/scons/SCons/PathList.pyR/�s		(t__revision__R.Rt
SCons.MemoizeRt
SCons.Nodet
SCons.UtilRRRR
tobjectRR/R2(((s /usr/lib/scons/SCons/PathList.pyt<module>s		MN

Youez - 2016 - github.com/yon3zu
LinuXploit