403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.221.20.252
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.opt-1.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)rZ	home_page)rZsummary)r�description)rZ
classifier)r�platform)rZ
requires_dist)rZsetup_requires_dist)rZ
provides_dist)rZobsoletes_dist)�files�
packages_root)r)r�modules)�globalZcommands)�backwards_compat�use_2to3)r�zip_safe)r�
tests_require)r)�name�versionZauthorZauthor_emailZ
maintainerZmaintainer_emailZurlr�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)rrrrr r$r"r#r%r&r'r)rrr()rrr*)rc	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�partsZcursor�module_nameZ	attr_nameZret�part�r:�9/opt/alt/python38/lib/python3.8/site-packages/pbr/util.py�resolve_name�s*
r<�	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_hookr:)�.0�hookr:r:r;�
<listcomp>�s�zcfg_to_args.<locals>.<listcomp>z)setup hook %s terminated the installationr,z#setup hook %s raised exception: %s
Tr*Fr�ext_modules�entry_pointsr
)"�configparserZSafeConfigParser�os�path�existsr�abspath�readZsections�dict�items�has_get_option�sys�insert�pop�split_multiliner<�
SystemExitr�error�exc_info�	traceback�
format_exc�exit�pbr�hooksZ
setup_hook�setup_cfg_to_setup_kwargs�register_custom_compilers�get_extension_modules�get_entry_points�
wrap_commandsr
Zset_extra_files)
rF�parser�config�sectionr>r!r@Zhook_fn�e�kwargsrBrCZfiles_extra_filesr:r:r;�cfg_to_args�sd
�
��rcc"
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.
    �r,rr�description_filer/z

)�true�t�1�yes�yTF)rrcSsg|]}t�d|��qS)z\1\2)�_VERSION_SPEC_RE�sub)r?Zpredr:r:r;rAKs�z-setup_cfg_to_setup_kwargs.<locals>.<listcomp>rz6(?P<package>[^;]*);?(?P<env_marker>[^#]*?)(?:\s*#.*)?$�package�
env_markerr!)r#r%N�=z1malformed package_data first line %r (misses "=")r%r(�extrasz6(?P<package>[^:]*):?(?P<env_marker>[^#]*?)(?:\s*#.*)?$z%s:(%s)�extras_require)�D1_D2_SETUP_ARGSr1rLrP�open�closerI�strip�
CSV_FIELDS�	split_csv�MULTI_FIELDS�BOOL_FIELDS�lower�re�match�group�appendr0�extendrrKrr<�get_command_name�
setdefaultrO)"r_rbZall_requirements�argr`�optionZin_cfg_value�value�filenamererZrequirement_patternZrequirement�mZrequirement_packagernr%�	firstline�prev�line�keyr(�distZcls_name�cls�cmdrpZextraZextra_requirementsZrequirementsZextras_valuerqZ	req_groupZ
extras_keyr:r:r;rYs�
�


�




��





rYcCs�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�	compilersrrzcustom compiler %sz
distutils.N)
rLrPr<�hasattrr�__name__r�
__module__�	distutilsZ	ccompilerZcompiler_classrMr)r_r�ZcompilerrZdescr8Zccr:r:r;rZ�s

rZc
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)
�sourcesZinclude_dirs�
define_macrosZundef_macrosZlibrary_dirsZ	librariesZruntime_library_dirsZ
extra_objectsZextra_compile_argsZextra_link_argsZexport_symbolsZ	swig_optsZdepends�:r,rocSsg|]}|���qSr:�ru)r?�lr:r:r;rA�sz)get_extension_modules.<locals>.<listcomp>rdr�	extensionr�Nr)r0r1rLrPrur~r	rO)
r_ZEXTENSION_FIELDSrBr`�labelsZext_argsZfieldr�ZmacrosZmacror:r:r;r[�s>


�r[cCs&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.
    rCcss|]\}}|t|�fVqdS�N)rP)r?r�r�r:r:r;�	<genexpr>s�z#get_entry_points.<locals>.<genexpr>)rJrK)r_r:r:r;r\s

�r\cCs�t�}|��|��D]�\}}i}|�|���D]H\}}|d}|�d�sT|�d�r0|�dd�\}}|�|i�}	||	|<q0|s�qd|kr�||dkr�|d|}
n
|�|�}
t	||
|�}||�di�|<qdS)Nr,z	pre_hook.z
post_hook.r+r()
rZparse_config_filesZget_command_listZget_option_dictrK�
startswithr0r�Zget_command_class�wrap_command)rbr�r��_rX�opt�valZ	hook_type�aliasZ	hook_dictr(Znew_cmdclassr:r:r;r]s"

r]c	Cs2|fdd�}t||tf|t|�d�|�d�d��S)NcSs"|�d�|�|�|�d�dS)N�pre_hook�	post_hook)�run_command_hooks�run)�selfr(r:r:r;r�2s

zwrap_command.<locals>.runr�r�)r�r�r�r�)�type�objectr��get)r�r(rXr�r:r:r;r�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: %rNr,zcannot find hook %s: %s�__call__zhook %r is not callablezrunning %s %s for command %szhook %s raised exception: %s
)�
ValueErrorr5�values�
isinstance�strr<r4rMrSrr�rr�infor�rRrTrUrV)Zcmd_objZ	hook_kindrXr@Zhook_obj�errrar:r:r;r�=s:
�
�r�cCsX||kr |||kr |||S||krP|�dd�||krP|||�dd�SdSdS)Nr��-F��replace)r_r`r�r:r:r;rLfs
rLcCs"dd�dd�|�d�D�D�}|S)z3Special behaviour when we have a multi line optionscSsg|]}|r|�qSr:r:�r?�elementr:r:r;rArs�z#split_multiline.<locals>.<listcomp>css|]}|��VqdSr�r�)r?r�r:r:r;r�ssz"split_multiline.<locals>.<genexpr>�
�r0�r�r:r:r;rPos�rPcCs"dd�dd�|�d�D�D�}|S)z8Special behaviour when we have a comma separated optionscSsg|]}|r|�qSr:r:r�r:r:r;rA{s�zsplit_csv.<locals>.<listcomp>css|]}|��VqdSr�r�)r?�chunkr:r:r;r�|szsplit_csv.<locals>.<genexpr>�,r�r�r:r:r;rwxs�rwcs�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)NZ_orig)r5r�r��setattr)�funcZorig�r�r:r;�wrapper�s
z#monkeypatch_method.<locals>.wrapperr:)r�r�r:r�r;�monkeypatch_method�sr�cs"eZdZdZd�fdd�	Z�ZS)�DefaultGetDictzXLike defaultdict, but the get() method also sets and returns the default
    value.
    Ncs"|dkr|��}tt|��||�Sr�)�default_factory�superr�r�)r�r��default��	__class__r:r;r��szDefaultGetDict.get)N)r�r��__qualname__�__doc__r��
__classcell__r:r:r�r;r��sr�cs(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�)r?Zpatr:r:r;rA�s�z'IgnoreDict.__init__.<locals>.<listcomp>)r{�compiler3�_IgnoreDict__ignore)r��ignorer:r:r;�__init__�s

��zIgnoreDict.__init__cs&|j�|�rdStt|��||�dSr�)r�r|r�r��__setitem__)r�r�r�r�r:r;r��szIgnoreDict.__setitem__)r�r�r�r�r�r�r�r:r:r�r;r��sr�)r=)2r�Zmultiprocessingr4ZloggingrEr{rMrT�collectionsrZdistutils.ccompilerr�r�distutils.errorsrrrZsetuptools.command.egg_inforZsetuptools.distrZsetuptools.extensionr	ZConfigParserrDrWr
Z	pbr.hooksr�rkrrrxryrvr<rcrYrZr[r\r]r�r�rLrPrwr�r�rJr�r:r:r:r;�<module>.s�
�' 
V"5)			

Youez - 2016 - github.com/yon3zu
LinuXploit