[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.58.61.176: ~ $
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�
/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�stripZcommunicate�
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>r/r1rrr�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>r/r1rrr�
get_librariesQsz+flags_from_pkgconfig.<locals>.get_librariescsdd���fdd�|��D�S)NcSs0|dd�}d|kr$t|�dd��S|dfSdS)Nr(�=r)�tupler0)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>r/r1rr<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>r/r1rrr�get_other_cflags^sz.flags_from_pkgconfig.<locals>.get_other_cflagscSsdd�|��D�S)NcSs$g|]}|�d�s|�d�s|�qS)r4r6r)r+rrrr.cs

�z@flags_from_pkgconfig.<locals>.get_other_libs.<locals>.<listcomp>r/r1rrr�get_other_libsbsz,flags_from_pkgconfig.<locals>.get_other_libscsFt��}t|d�}t|d�}�|��|��|��|��|��|�d�S)Nz--cflagsz--libs)Zinclude_dirsZlibrary_dirsZ	librariesZ
define_macrosZextra_compile_argsZextra_link_args)r�getfilesystemencodingr&)r!ZfseZ
all_cflagsZall_libs�r3r7r5r=r>r?rr�kwargsgs

�z$flags_from_pkgconfig.<locals>.kwargs)r
)ZlibsrBZretr!Z	lib_flagsrrAr�flags_from_pkgconfig<s	rC)	rrr�errorrr
r@r&rCrrrr�<module>s"

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 452 B 0644
__init__.cpython-38.pyc File 452 B 0644
api.cpython-38.opt-1.pyc File 33.25 KB 0644
api.cpython-38.pyc File 33.3 KB 0644
backend_ctypes.cpython-38.opt-1.pyc File 38.74 KB 0644
backend_ctypes.cpython-38.pyc File 39.04 KB 0644
cffi_opcode.cpython-38.opt-1.pyc File 4.54 KB 0644
cffi_opcode.cpython-38.pyc File 4.59 KB 0644
commontypes.cpython-38.opt-1.pyc File 1.75 KB 0644
commontypes.cpython-38.pyc File 1.8 KB 0644
cparser.cpython-38.opt-1.pyc File 21.75 KB 0644
cparser.cpython-38.pyc File 21.88 KB 0644
error.cpython-38.opt-1.pyc File 1.41 KB 0644
error.cpython-38.pyc File 1.41 KB 0644
ffiplatform.cpython-38.opt-1.pyc File 3.38 KB 0644
ffiplatform.cpython-38.pyc File 3.38 KB 0644
lock.cpython-38.opt-1.pyc File 346 B 0644
lock.cpython-38.pyc File 346 B 0644
model.cpython-38.opt-1.pyc File 18.94 KB 0644
model.cpython-38.pyc File 19.11 KB 0644
pkgconfig.cpython-38.opt-1.pyc File 5 KB 0644
pkgconfig.cpython-38.pyc File 5 KB 0644
recompiler.cpython-38.opt-1.pyc File 44.86 KB 0644
recompiler.cpython-38.pyc File 45.34 KB 0644
setuptools_ext.cpython-38.opt-1.pyc File 6.94 KB 0644
setuptools_ext.cpython-38.pyc File 6.97 KB 0644
vengine_cpy.cpython-38.opt-1.pyc File 34.38 KB 0644
vengine_cpy.cpython-38.pyc File 34.63 KB 0644
vengine_gen.cpython-38.opt-1.pyc File 20.21 KB 0644
vengine_gen.cpython-38.pyc File 20.5 KB 0644
verifier.cpython-38.opt-1.pyc File 8.93 KB 0644
verifier.cpython-38.pyc File 8.96 KB 0644