|Pؚ Z d Z ddlmZ ddlZddlZddlZddlZddlZddlm Z m
Z
mZ ddlm
Z
ddlmZ ddlmZmZ ddlmZ dd lmZ dd
lmZmZ ddlmZmZmZmZ dd
lmZ ddl m!Z!m"Z# ddl$m%Z% ddl&m'Z' ddl(m)Z) erddl*m+Z+ ddl,m-Z- ed Z. edd Z/ G d d Z0 d\d]d Z1 d\d^d$Z2d_d'Z3d`d*Z4dad,Z5 dbdcd1Z6ddd5Z7ded8Z8dfd:Z9 dbdgd=Z: dbdhdAZ;ddddBdidEZdldNZ? d\dmdRZ@ dndodWZA G dX dY ZB G dZ d[ee.e/f ZCdS )pai Utility functions to expand configuration directives or special values
(such glob patterns).
We can split the process of interpreting configuration files into 2 steps:
1. The parsing the file contents from strings to value objects
that can be understand by Python (for example a string with a comma
separated list of keywords into an actual Python list of strings).
2. The expansion (or post-processing) of these values according to the
semantics ``setuptools`` assign to them (for example a configuration field
with the ``file:`` directive should be expanded from a list of file paths to
a single string with the contents of those files concatenated)
This module focus on the second step, and therefore allow sharing the expansion
functions among several configuration file formats.
**PRIVATE MODULE**: API reserved for setuptools internal usage only.
)annotationsN)IterableIteratorMapping)ConfigParser)iglob)
ModuleSpecall_suffixes)chain)Path)
ModuleType
TracebackType)
TYPE_CHECKINGAnyCallableTypeVar )_static)StrPath same_path)find_package_path)SetuptoolsWarning)DistutilsOptionError)Self)Distribution_K_V_coT) covariantc * e Zd ZdZddZdd
ZddZd
S )StaticModulez>Proxy to a module object that avoids executing arbitrary code.namestrspecr returnNonec t j t j |j }t
| t | ` d S N)
astparsepathlibr origin
read_bytesvarsupdatelocalsself)r0 r! r# modules j/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/setuptools/config/expand.py__init__zStaticModule.__init__8 sP 7<44??AABBT
&((###III !Iterator[tuple[ast.AST, ast.AST]]c # K | j j D ]gt t j rfdj D E d {V 6t t j rj rj j fV hd S )Nc 3 * K | ]
}|j fV d S r' )value).0target statements r2 z1StaticModule._find_assignments..@ s* VV&VY_5VVVVVVr4 ) r1 body
isinstancer( Assigntargets AnnAssignr8 r: )r0 r; s @r2 _find_assignmentszStaticModule._find_assignments= s ) : :I)SZ00
:VVVVIDUVVVVVVVVVVVIs}55
:)/
: '9999 : :r4 attrc t fd| D S # t $ r}t | j d |d}~ww xY w)zHAttempt to load an attribute "statically", via :func:`ast.literal_eval`.c 3 K | ]@\ }}t |t j r!|j k *t j | V Ad S r' )r> r( Nameidliteral_eval)r9 r: r8 rC s r2 r<