Edit File: pkgconfig.cpython-311.pyc
� ����r�d�����������������������Z�����d�dl�Z�d�dlZd�dlZddlmZ�d��Z�e�j����������������������fd�Zd��ZdS�)�����N����)�PkgConfigErrorc������������������0����|������������������������������������D�]�\��}}||�vr||�|<����t����������|�|���������t����������������������st����������d|�d��������������t����������|t����������������������st����������d|�d��������������|�|������������������������������|���������������|�S�)z�Merge values from cffi config flags cfg2 to cf1 Example: merge_flags({"libraries": ["one"]}, {"libraries": ["two"]}) {"libraries": ["one", "two"]} zcfg1[z] should be a list of stringszcfg2[)�items� isinstance�list� TypeError�extend)�cfg1�cfg2�key�values��� �a/builddir/build/BUILD/cloudlinux-venv-1.0.2/venv/lib64/python3.11/site-packages/cffi/pkgconfig.py�merge_flagsr������s���������j�j�l�l��$��$� ��U��d�?�?��D��I�I��d�3�i��.�.�� Q��i�#�#�#� O�P�P�P��e�T�*�*�� Q��i�#�#�#� O�P�P�P���I���U�#�#�#�#��K�����c������������������8����ddg}|����������������������|�������������|����������������������|�������������� �t����������j��������|t����������j��������t����������j���������������������}nC#�t����������$�r6}t����������dt ����������|��������������������������������������������������������������d}~ww�xY�w|�����������������������������������\��}}|j ��������dk����rH �|� ��������������������|������������}n#�t����������$�r�Y�nw�xY�wt����������|������������������������������������������������t����������j ��������dk����rUt����������|t����������������������s@ �|� ��������������������|������������}n)#�t����������$�r�t����������d|�d |��d |�d|���������������w�xY�wt ����������j��������dk����rd|v�rt����������d|�d |��d |���������������|S�)z5Calls pkg-config and returns the output if found z pkg-configz--print-errors)�stdout�stderrzcannot run pkg-config: Nr���)����zpkg-config � z5 returned bytes that cannot be decoded with encoding z: �\z3 returned an unsupported backslash-escaped output: )�append� subprocess�Popen�PIPE�EnvironmentErrorr����str�strip�communicate� returncode�decode� Exception�sys�version_infor����UnicodeDecodeError�os�altsep)�libname�flag�encoding�a�pc�e�bout�berrs��� r����callr0������s������� �'�(�A��H�H�T�N�N�N��H�H�W����N� � �a� �� �� P� P� P������N��N��N��n�C��F�F�L�L�N�N�N�L�M�M�M�����N��������!�!�J�D�$� �}���� ��;�;�x�(�(�D�D���� �� �� ��D� �����T�Z�Z�\�\�*�*�*� ��4��� �4��(=�(=�� B��;�;�x�(�(�D�D��!�� B�� B�� B� �.�"&�$�$�������4�4�"A��B��B�� B� B���� � �y�D���T�T�\�\��n�"�d�d�G�G�G�T�T�3��4��4�� 4���Ks5����+A�� B�&1B�B�C�� C%�$C%�/E��&E+c�������������������������� � ��d���d���d���d���d��� d��� ����� � fd�}i�}|�D�]}�||������������}t����������||��������������|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. c������������������>�����d��|�������������������������������������D���������������S�)Nc������������������L�����g�|�]!}|����������������������d��������������|dd������������"S�)�-I����N�� startswith��.0�xs��� r���� <listcomp>zBflags_from_pkgconfig.<locals>.get_include_dirs.<locals>.<listcomp>L����1������D�D�D�!����d�1C�1C�D��!�"�"��D�D�Dr�����split��strings��� r����get_include_dirsz.flags_from_pkgconfig.<locals>.get_include_dirsK����������D�D�v�|�|�~�~�D�D�D�Dr���c������������������>�����d��|�������������������������������������D���������������S�)Nc������������������L�����g�|�]!}|����������������������d��������������|dd������������"S�)�-Lr5���Nr6���r8���s��� r���r;���zBflags_from_pkgconfig.<locals>.get_library_dirs.<locals>.<listcomp>O���r<���r���r=���r?���s��� r����get_library_dirsz.flags_from_pkgconfig.<locals>.get_library_dirsN���rB���r���c������������������>�����d��|�������������������������������������D���������������S�)Nc������������������L�����g�|�]!}|����������������������d��������������|dd������������"S�)�-lr5���Nr6���r8���s��� r���r;���z?flags_from_pkgconfig.<locals>.get_libraries.<locals>.<listcomp>R���r<���r���r=���r?���s��� r���� get_librariesz+flags_from_pkgconfig.<locals>.get_librariesQ���rB���r���c������������������J������d����fd�|�������������������������������������D���������������S�)Nc������������������l�����|�dd�����������}�d|�v�r#t����������|����������������������dd������������������������S�|�d�fS�)Nr5����=r���)�tupler>���)r:���s��� r����_macroz8flags_from_pkgconfig.<locals>.get_macros.<locals>._macroV���s<�������!�"�"��A��a�x�x��Q�W�W�S�!�_�_�-�-�-��4�y� r���c������������������P������g�|�]"}|����������������������d����������������|��������������#S�)�-Dr6���)r9���r:���rO���s��� �r���r;���z<flags_from_pkgconfig.<locals>.get_macros.<locals>.<listcomp>\���s2�������H�H�H�a�Q�\�\�$�5G�5G�H���q� � �H�H�Hr���r=���)r@���rO���s��� @r���� get_macrosz(flags_from_pkgconfig.<locals>.get_macrosU���s7������� !�� !�� !��I�H�H�H�6�<�<�>�>�H�H�H�Hr���c������������������>�����d��|�������������������������������������D���������������S�)Nc������������������f�����g�|�].}|����������������������d��������������|����������������������d�������������,|��/S�)r4���rQ���r6���r8���s��� r���r;���zBflags_from_pkgconfig.<locals>.get_other_cflags.<locals>.<listcomp>_����S�������E��E��E�a����d�1C�1C��E�12���d�1C�1C�E���E��E��Er���r=���r?���s��� r����get_other_cflagsz.flags_from_pkgconfig.<locals>.get_other_cflags^����0������E��E�6�<�<�>�>��E��E��E�� Er���c������������������>�����d��|�������������������������������������D���������������S�)Nc������������������f�����g�|�].}|����������������������d��������������|����������������������d�������������,|��/S�)rE���rI���r6���r8���s��� r���r;���z@flags_from_pkgconfig.<locals>.get_other_libs.<locals>.<listcomp>c���rU���r���r=���r?���s��� r����get_other_libsz,flags_from_pkgconfig.<locals>.get_other_libsb���rW���r���c�������������������������t����������j����������������������}t����������|�d������������}t����������|�d������������}��|��������������|��������������|��������������|��������������|�������������� |������������d�S�)Nz--cflagsz--libs)�include_dirs�library_dirs� libraries� define_macros�extra_compile_args�extra_link_args)r#����getfilesystemencodingr0���) r(����fse� all_cflags�all_libsrA���rJ���rF���rR���rV���rZ���s ��� ������r����kwargsz$flags_from_pkgconfig.<locals>.kwargsg���s���������'�)�)���'�:�.�.� ����*�*��,�,�Z�8�8�,�,�X�6�6�&��x�0�0�'�Z� �3�3�"2�"2�:�">�">�-�~�h�7�7� ���� r���)r���)�libsrf����retr(���� lib_flagsrA���rJ���rF���rR���rV���rZ���s��� @@@@@@r����flags_from_pkgconfigrj���<���s�������������E��E��E�E��E��E�E��E��E�I��I��I�E��E��E�E��E��E� �������������������� �C���$��$���F�7�O�O� ��C��#�#�#�#��Jr���) r#���r&���r����errorr���r���rb���r0���rj�����r���r����<module>rm������s�������������������������������!��!��!��!��!��!������&�";��!:�!<�!<���������D=��=��=��=��=r���