403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.142.201.222
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib/python3.8/site-packages/pbr/__pycache__/util.cpython-38.pyc
U

�V.a� @s�dZzddlZWnek
r$YnXddlZddlZddlZddlZddlZddlm	Z	ddl
ZddlmZddl
mZmZmZddlmZddlmZddlmZzddlZWnek
r�ddlZYnXdd	lmZddlZe�d
�Zdddddddd
dddddddddddddddddddddddd�ZdZdZ d Z!d!d"�Z"d@d$d%�Z#d&d'�Z$d(d)�Z%d*d+�Z&d,d-�Z'd.d/�Z(d0d1�Z)d2d3�Z*d4d5�Z+d6d7�Z,d8d9�Z-d:d;�Z.Gd<d=�d=e	�Z/Gd>d?�d?e0�Z1dS)Aa�The code in this module is mostly copy/pasted out of the distutils2 source
code, as recommended by Tarek Ziade.  As such, it may be subject to some change
as distutils2 development continues, and will have to be kept up to date.

I didn't want to use it directly from distutils2 itself, since I do not want it
to be an installation dependency for our packages yet--it is still too unstable
(the latest version on PyPI doesn't even install).
�N)�defaultdict)�log)�DistutilsOptionError�DistutilsModuleError�DistutilsFileError)�manifest_maker)�Distribution)�	Extension)�extra_filesz\s*(.*?)\s*\((.*)\)\s*$)�metadata)r�	home_page)r�summary)r�description)r�
classifier)r�platform)r�
requires_dist)r�setup_requires_dist)r�
provides_dist)r�obsoletes_dist)�files�
packages_root)r)r�modules)�global�commands)�backwards_compat�use_2to3)r�zip_safe)r�
tests_require)r)�name�version�author�author_email�
maintainer�maintainer_email�urlr�keywords�long_descriptionzdownload-url�classifiers�	platforms�license�install_requires�setup_requires�provides�	obsoletes�package_dir�packages�package_data�namespace_packages�
data_files�scripts�
py_modules�cmdclassrrr�dependency_links�include_package_data)r'r(r*r,r-r1r/r0r2r3r4r6r+rr5)rrr7)r%c	Cs�|�d�}t|�d}|d|�}|d}|dkr�ztd�|�|gd�}Wq�Wq*tk
r�|dkrh�|d8}|d|�}||}d}Yq*Xq*||d�D]0}zt||�}Wq�tk
r�t|��Yq�Xq�|S)z�Resolve a name like ``module.object`` to an object and return it.

    Raise ImportError if the module or name is not found.
    �.�N���r)�fromlist�)�split�len�
__import__�join�ImportError�getattr�AttributeError)r�parts�cursor�module_name�	attr_name�ret�part�rJ�9/opt/alt/python38/lib/python3.8/site-packages/pbr/util.py�resolve_name�s*
rL�	setup.cfgc
	Cs�t��}tj�|�s(tdtj�|���|�|�i}|��D]}t	|�
|��||<q>t|dd�}t|dd�}|r�tj�|�}tj�
d|��z|�r&dd�t|�D�}|D]x}t|�}z||�Wq�tk
r�t�d	�Yq�t��d
}t�d||f�t�t���t�d
�Yq�Xq�tj�|�t|�}	d|	d
<d|	d<t|�t|�}
|
�rh|
|	d<t|�}|�r~||	d<t|	�t|dd�}|�r�t �!t|��W5|�r�tj�d�X|	S)aP Distutils2 to distutils1 compatibility util.

        This method uses an existing setup.cfg to generate a dictionary of
        keywords that can be used by distutils.core.setup(kwargs**).

        :param file:
            The setup.cfg path.
        :raises DistutilsFileError:
            When the setup.cfg file is not found.

    zfile '%s' does not existr�setup_hooksrrrcSsg|]}|dkr|�qS)zpbr.hooks.setup_hookrJ)�.0�hookrJrJrK�
<listcomp>�s�zcfg_to_args.<locals>.<listcomp>z)setup hook %s terminated the installationr9z#setup hook %s raised exception: %s
Tr7Fr�ext_modules�entry_pointsr
)"�configparser�SafeConfigParser�os�path�existsr�abspath�read�sections�dict�items�has_get_option�sys�insert�pop�split_multilinerL�
SystemExitr�error�exc_info�	traceback�
format_exc�exit�pbr�hooks�
setup_hook�setup_cfg_to_setup_kwargs�register_custom_compilers�get_extension_modules�get_entry_points�
wrap_commandsr
�set_extra_files)
rW�parser�config�sectionrNr.rP�hook_fn�e�kwargsrRrS�files_extra_filesrJrJrK�cfg_to_args�sd
�
��ryc"
Cs�i}i}tD�]�}tt|�dkr0t|\}}n tt|�dkrPt|d}|}t|||�}|s�|dkrt||d�}|r�t|�}d}|D]0}t|�}	z||	����d7}W5|	��Xq�|}nq|tkr�t	|�}|t
kr�t|�}n"|tk�r|��dk�rd	}nd
}|�r�|dk�r$dd
�|D�}|dk�r�g}
d}|D]<}t
�||�}
|
�d���}|
�d���}|
�||f��q:|
|d<�n|dk�r�d|i}�n|dk�rbi}d	}d}|D]�}d|k�r|�dd�\}}|��|��}}||k�r||}|�|���n|��}||��<n&|�r0td|��n|�|�����d
}�q�|dk�r\|��}|}n@|dk�r�i}t�}|D]"}t|�}||�}|||��<�qz|}|||<qd|k�r$d}|d}|D]\}g}t||�}|D]8}t
�||�}
|
�d���}|
�d�}|�||f��q�|||<�q�i}|D]D} || D]4\}}|�rTd| |f}!n| }!|�|!g��|��q8�q,|�dg�|d<||d<|S)zqProcesses the setup.cfg options and converts them to arguments accepted
    by setuptools' setup() function.
    �r9rr&�description_filer<z

)�true�t�1�yes�yTF)r*rcSsg|]}t�d|��qS)z\1\2)�_VERSION_SPEC_RE�sub)rO�predrJrJrKrQKs�z-setup_cfg_to_setup_kwargs.<locals>.<listcomp>r*z6(?P<package>[^;]*);?(?P<env_marker>[^#]*?)(?:\s*#.*)?$�package�
env_markerr.)r0r2N�=z1malformed package_data first line %r (misses "=")r2r5�extrasz6(?P<package>[^:]*):?(?P<env_marker>[^#]*?)(?:\s*#.*)?$z%s:(%s)�extras_require)�D1_D2_SETUP_ARGSr>r^rb�open�closerZ�strip�
CSV_FIELDS�	split_csv�MULTI_FIELDS�BOOL_FIELDS�lower�re�match�group�appendr=�extendrr]rrL�get_command_name�
setdefaultra)"rsrw�all_requirements�argrt�option�in_cfg_value�value�filenamer{r*�requirement_pattern�requirement�m�requirement_packager�r2�	firstline�prev�line�keyr5�dist�cls_name�cls�cmdr��extra�extra_requirements�requirements�extras_valuer��	req_group�
extras_keyrJrJrKrls�
�


�




��





rlcCs�t|dd�}|r�t|�}|D]p}t|�}t|d�r:|j}n|j}t|d�rR|j}nd|}|j}tj	j
}||j|f||<tj|tjd|<qdS)z�Handle custom compilers; this has no real equivalent in distutils, where
    additional compilers could only be added programmatically, so we have to
    hack it in somehow.
    r�	compilersrrzcustom compiler %sz
distutils.N)
r^rbrL�hasattrr�__name__r�
__module__�	distutils�	ccompiler�compiler_classr_r)rsr��compilerr�descrF�ccrJrJrKrm�s

rmc
Cs(d}g}|D�]}d|kr(|�dd�}n|�dd�}dd�|D�}t|�dkr|dd	kri}|D]�}t|||�}|sxqbt|�}|d
kr�g}|D]P}	|	�dd�}	t|	�dkr�|	d��df}	n|	d��|	d��f}	|�|	�q�|}|||<qb|rd|k�r
|d|d<|�t|�d�f|��q|S)
zHandle extension modules)
�sources�include_dirs�
define_macros�undef_macros�library_dirs�	libraries�runtime_library_dirs�
extra_objects�extra_compile_args�extra_link_args�export_symbols�	swig_opts�depends�:r9r�cSsg|]}|���qSrJ�r�)rO�lrJrJrKrQ�sz)get_extension_modules.<locals>.<listcomp>rzr�	extensionr�Nr)r=r>r^rbr�r�r	ra)
rs�EXTENSION_FIELDSrRrt�labels�ext_args�fieldr��macros�macrorJrJrKrn�s>


�rncCs&d|kriStdd�|d��D��S)aProcess the [entry_points] section of setup.cfg to handle setuptools
    entry points.  This is, of course, not a standard feature of
    distutils2/packaging, but as there is not currently a standard alternative
    in packaging, we provide support for them.
    rScss|]\}}|t|�fVqdS�N)rb)rOr�r�rJrJrK�	<genexpr>s�z#get_entry_points.<locals>.<genexpr>)r\r])rsrJrJrKros

�rocCs�t�}|��|��D]�\}}i}|�|���D]H\}}|d}|�d�sT|�d�r0|�dd�\}}|�|i�}	||	|<q0|s�qd|kr�||dkr�|d|}
n
|�|�}
t	||
|�}||�di�|<qdS)Nr9z	pre_hook.z
post_hook.r8r5)
r�parse_config_files�get_command_list�get_option_dictr]�
startswithr=r��get_command_class�wrap_command)rwr�r��_rj�opt�val�	hook_type�alias�	hook_dictr5�new_cmdclassrJrJrKrps"

rpc	Cs2|fdd�}t||tf|t|�d�|�d�d��S)NcSs"|�d�|�|�|�d�dS)N�pre_hook�	post_hook)�run_command_hooks�run)�selfr5rJrJrKr�2s

zwrap_command.<locals>.runr�r�)r�r�r�r�)�type�objectr��get)r�r5rjr�rJrJrKr�1s
��r�c	Cs|dkrtd|��t||d�}|dkr,dS|��D]�}t|t�r�zt|�}Wq�tk
r~t��d}t	d||f��Yq�Xn|}t
|d�s�td|��t�
d|||���z||�Wq4t��d}t�d	||f�t�t���t�d�Yq4Xq4dS)
z�Run hooks registered for that command and phase.

    *cmd_obj* is a finalized command object; *hook_kind* is either
    'pre_hook' or 'post_hook'.
    )r�r�zinvalid hook kind: %rNr9zcannot find hook %s: %s�__call__zhook %r is not callablezrunning %s %s for command %szhook %s raised exception: %s
)�
ValueErrorrB�values�
isinstance�strrLrAr_rerr�rr�infor�rdrfrgrh)�cmd_obj�	hook_kindrjrP�hook_obj�errrvrJrJrKr�=s:
�
�r�cCsX||kr |||kr |||S||krP|�dd�||krP|||�dd�SdSdS)Nr��-F��replace)rsrtr�rJrJrKr^fs
r^cCs"dd�dd�|�d�D�D�}|S)z3Special behaviour when we have a multi line optionscSsg|]}|r|�qSrJrJ�rO�elementrJrJrKrQrs�z#split_multiline.<locals>.<listcomp>css|]}|��VqdSr�r�)rOr�rJrJrKr�ssz"split_multiline.<locals>.<genexpr>�
�r=�r�rJrJrKrbos�rbcCs"dd�dd�|�d�D�D�}|S)z8Special behaviour when we have a comma separated optionscSsg|]}|r|�qSrJrJr�rJrJrKrQ{s�zsplit_csv.<locals>.<listcomp>css|]}|��VqdSr�r�)rO�chunkrJrJrKr�|szsplit_csv.<locals>.<genexpr>�,r�r�rJrJrKr�xs�r�cs�fdd�}|S)z[A function decorator to monkey-patch a method of the same name on the
    given class.
    cs:t�|jd�}|r6t|d�s6t|d|�t�|j|�|S)N�_orig)rBr�r��setattr)�func�orig�r�rJrK�wrapper�s
z#monkeypatch_method.<locals>.wrapperrJ)r�rrJrrK�monkeypatch_method�srcs"eZdZdZd�fdd�	Z�ZS)�DefaultGetDictzXLike defaultdict, but the get() method also sets and returns the default
    value.
    Ncs"|dkr|��}tt|��||�Sr�)�default_factory�superrr�)r�r��default��	__class__rJrKr��szDefaultGetDict.get)N)r�r��__qualname__�__doc__r��
__classcell__rJrJrrKr�srcs(eZdZdZdd�Z�fdd�Z�ZS)�
IgnoreDictz�A dictionary that ignores any insertions in which the key is a string
    matching any string in `ignore`.  The ignore list can also contain wildcard
    patterns using '*'.
    cCs$t�dd�dd�|D���|_dS)Nz(%s)�|cSsg|]}|�dd��qS)�*z.*r�)rO�patrJrJrKrQ�s�z'IgnoreDict.__init__.<locals>.<listcomp>)r��compiler@�_IgnoreDict__ignore)r��ignorerJrJrK�__init__�s

��zIgnoreDict.__init__cs&|j�|�rdStt|��||�dSr�)rr�rr
�__setitem__)r�r�r�rrJrKr�szIgnoreDict.__setitem__)r�r�r
rrrrrJrJrrKr
�sr
)rM)2r�multiprocessingrA�loggingrVr�r_rf�collectionsr�distutils.ccompilerr�r�distutils.errorsrrr�setuptools.command.egg_infor�setuptools.distr�setuptools.extensionr	�ConfigParserrTrir
�	pbr.hooksrr�r�r�r�r�rLryrlrmrnrorpr�r�r^rbr�rrr\r
rJrJrJrK�<module>.s�
�' 
V"5)			

Youez - 2016 - github.com/yon3zu
LinuXploit