403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.14.133.134
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/lib64/python3.8/site-packages/cffi/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib64/python3.8/site-packages/cffi/__pycache__/pkgconfig.cpython-38.pyc
U

ل=^�@sHddlZddlZddlZddlmZdd�Ze��fdd�Zdd	�ZdS)
�N�)�PkgConfigErrorcCsj|��D]\\}}||kr"|||<qt||t�s>td|f��t|t�sVtd|f��||�|�q|S)z�Merge values from cffi config flags cfg2 to cf1

    Example:
        merge_flags({"libraries": ["one"]}, {"libraries": ["two"]})
        {"libraries": ["one", "two"]}
    z$cfg1[%r] should be a list of stringsz$cfg2[%r] should be a list of strings)�items�
isinstance�list�	TypeError�extend)Zcfg1Zcfg2�key�value�r�A/opt/alt/python38/lib64/python3.8/site-packages/cffi/pkgconfig.py�merge_flagss

r
c
Cs2ddg}|�|�|�|�ztj|tjtjd�}Wn8tk
rl}ztdt|���f��W5d}~XYnX|��\}}|j	dkr�z|�
|�}Wntk
r�YnXt|����tj
dk�rt|t��sz|�
|�}Wn*tk
�rtd||||f��YnXtjd	k�r.d	|k�r.td
|||f��|S)z5Calls pkg-config and returns the output if found
    z
pkg-configz--print-errors)�stdout�stderrzcannot run pkg-config: %sNr)�zKpkg-config %s %s returned bytes that cannot be decoded with encoding %r:
%r�\zEpkg-config %s %s returned an unsupported backslash-escaped output:
%r)�append�
subprocess�Popen�PIPE�EnvironmentErrorr�str�strip�communicate�
returncode�decode�	Exception�sys�version_infor�UnicodeDecodeError�os�altsep)�libname�flag�encoding�aZpc�eZboutZberrrrr�calls4

(

��r'csjdd��dd��dd��dd��d	d
��dd��������fd
d�}i}|D]}||�}t||�qN|S)a�Return compiler line flags for FFI.set_source based on pkg-config output

    Usage
        ...
        ffibuilder.set_source("_foo", pkgconfig = ["libfoo", "libbar >= 1.8.3"])

    If pkg-config is installed on build machine, then arguments include_dirs,
    library_dirs, libraries, define_macros, extra_compile_args and
    extra_link_args are extended with an output of pkg-config for libfoo and
    libbar.

    Raises PkgConfigError in case the pkg-config call fails.
    cSsdd�|��D�S)NcSs"g|]}|�d�r|dd��qS)�-I�N��
startswith��.0�xrrr�
<listcomp>Ls
zBflags_from_pkgconfig.<locals>.get_include_dirs.<locals>.<listcomp>��split��stringrrr�get_include_dirsKsz.flags_from_pkgconfig.<locals>.get_include_dirscSsdd�|��D�S)NcSs"g|]}|�d�r|dd��qS)�-Lr)Nr*r,rrrr/Os
zBflags_from_pkgconfig.<locals>.get_library_dirs.<locals>.<listcomp>r0r2rrr�get_library_dirsNsz.flags_from_pkgconfig.<locals>.get_library_dirscSsdd�|��D�S)NcSs"g|]}|�d�r|dd��qS)�-lr)Nr*r,rrrr/Rs
z?flags_from_pkgconfig.<locals>.get_libraries.<locals>.<listcomp>r0r2rrr�
get_librariesQsz+flags_from_pkgconfig.<locals>.get_librariescsdd���fdd�|��D�S)NcSs0|dd�}d|kr$t|�dd��S|dfSdS)Nr)�=r)�tupler1)r.rrr�_macroVsz8flags_from_pkgconfig.<locals>.get_macros.<locals>._macrocsg|]}|�d�r�|��qS)�-Dr*r,�r;rrr/\s
z<flags_from_pkgconfig.<locals>.get_macros.<locals>.<listcomp>r0r2rr=r�
get_macrosUsz(flags_from_pkgconfig.<locals>.get_macroscSsdd�|��D�S)NcSs$g|]}|�d�s|�d�s|�qS)r(r<r*r,rrrr/_s

�zBflags_from_pkgconfig.<locals>.get_other_cflags.<locals>.<listcomp>r0r2rrr�get_other_cflags^sz.flags_from_pkgconfig.<locals>.get_other_cflagscSsdd�|��D�S)NcSs$g|]}|�d�s|�d�s|�qS)r5r7r*r,rrrr/cs

�z@flags_from_pkgconfig.<locals>.get_other_libs.<locals>.<listcomp>r0r2rrr�get_other_libsbsz,flags_from_pkgconfig.<locals>.get_other_libscsFt��}t|d�}t|d�}�|��|��|��|��|��|�d�S)Nz--cflagsz--libs)�include_dirs�library_dirs�	libraries�
define_macros�extra_compile_args�extra_link_args)r�getfilesystemencodingr')r"ZfseZ
all_cflagsZall_libs�r4r8r6r>r?r@rr�kwargsgs

�z$flags_from_pkgconfig.<locals>.kwargs)r
)ZlibsrI�retr"Z	lib_flagsrrHr�flags_from_pkgconfig<s	rK)	rr r�errorrr
rGr'rKrrrr�<module>s"

Youez - 2016 - github.com/yon3zu
LinuXploit