403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/setuptools/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/setuptools/__pycache__/build_meta.cpython-39.pyc
a

��e4I�@s�dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZmZmZddlZddlZddlmZddlmZddlmZdd	l	mZdd
lmZgd�Ze�dd
���Z de �!dd�vZ"Gdd�de#�Z$Gdd�dej%j&�Z&ej'dd��Z(dd�Z)dd�Z*dd�Z+ej'dd��Z,ee
e-ee-ee-dffZ.Gdd �d �Z/Gd!d"�d"e/�Z0Gd#d$�d$e0�Z1e0�Z2e2j3Z3e2j4Z4e2j5Z5e2j6Z6e2j7Z7e"�s�e2j8Z8e2j9Z9e2j:Z:e1�Z;dS)%a-A PEP 517 interface to setuptools

Previously, when a user or a command line tool (let's call it a "frontend")
needed to make a request of setuptools to take a certain action, for
example, generating a list of installation requirements, the frontend would
would call "setup.py egg_info" or "setup.py bdist_wheel" on the command line.

PEP 517 defines a different method of interfacing with setuptools. Rather
than calling "setup.py" directly, the frontend should:

  1. Set the current directory to the directory with a setup.py file
  2. Import this module into a safe python interpreter (one in which
     setuptools can potentially set global variables or crash hard).
  3. Call one of the functions defined in PEP 517.

What each function does is defined in PEP 517. However, here is a "casual"
definition of the functions (this definition should not be relied on for
bug reports or API stability):

  - `build_wheel`: build a wheel in the folder and return the basename
  - `get_requires_for_build_wheel`: get the `setup_requires` to build
  - `prepare_metadata_for_build_wheel`: get the `install_requires`
  - `build_sdist`: build an sdist in the folder and return the basename
  - `get_requires_for_build_sdist`: get the `setup_requires` to build

Again, this is not a formal definition! Just a "taste" of the module.
�N)�Path)�Dict�Iterator�List�Optional�Union�)�errors)�	same_path)�
parse_strings)�SetuptoolsDeprecationWarning)�	strtobool)
�get_requires_for_build_sdist�get_requires_for_build_wheel� prepare_metadata_for_build_wheel�build_wheel�build_sdist�get_requires_for_build_editable�#prepare_metadata_for_build_editable�build_editable�
__legacy__�SetupRequirementsError�SETUPTOOLS_ENABLE_FEATURES�zlegacy-editable�_�-c@seZdZdd�ZdS)rcCs
||_dS�N)�
specifiers)�selfr�r�9/usr/lib/python3.9/site-packages/setuptools/build_meta.py�__init__DszSetupRequirementsError.__init__N)�__name__�
__module__�__qualname__r!rrrr rCsrc@s&eZdZdd�Zeejdd���ZdS)�DistributioncCstt|��}t|��dSr)�listrr)rrZspecifier_listrrr �fetch_build_eggsIszDistribution.fetch_build_eggsccs2tjj}|tj_zdVW|tj_n
|tj_0dS)zw
        Replace
        distutils.dist.Distribution with this class
        for the duration of this context.
        N)�	distutils�corer%)�cls�origrrr �patchNs
zDistribution.patchN)r"r#r$r'�classmethod�
contextlib�contextmanagerr,rrrr r%Hsr%ccs.tj}dd�t_zdVW|t_n|t_0dS)a
Temporarily disable installing setup_requires

    Under PEP 517, the backend reports build dependencies to the frontend,
    and the frontend is responsible for ensuring they're installed.
    So setuptools (acting as a backend) should not try to install them.
    cSsdSrr)�attrsrrr �<lambda>g�z+no_install_setup_requires.<locals>.<lambda>N)�
setuptoolsZ_install_setup_requires)r+rrr �no_install_setup_requires^s

r4cs�fdd�t���D�S)Ncs&g|]}tj�tj��|��r|�qSr)�os�path�isdir�join)�.0�name�Za_dirrr �
<listcomp>osz1_get_immediate_subdirectories.<locals>.<listcomp>)r5�listdirr;rr;r �_get_immediate_subdirectoriesns
�r>csD�fdd�t�|�D�}z
|\}Wnty>td�d�Yn0|S)Nc3s|]}|���r|VqdSr��endswith�r9�f��	extensionrr �	<genexpr>ur2z'_file_with_extension.<locals>.<genexpr>z[No distribution was found. Ensure that `setup.py` is not empty and that it calls `setup()`.)r5r=�
ValueError)Z	directoryrDZmatching�filerrCr �_file_with_extensionts
��rHcCs tj�|�st�d�St�|�S)Nz%from setuptools import setup; setup())r5r6�exists�io�StringIO�tokenize�open��setup_scriptrrr �_open_setup_script�s
rPccs>t���"t�dd�dVWd�n1s00YdS)N�ignorezsetup.py install is deprecated)�warnings�catch_warnings�filterwarningsrrrr �suppress_known_deprecation�s
rUc@sveZdZdZeeeed�dd�Zeeed�dd�Z	eeed�dd	�Z
eeed�d
d�Zeeed�dd
�ZdS)�_ConfigSettingsTranslatorz�Translate ``config_settings`` into distutils-style command arguments.
    Only a limited number of options is currently supported.
    )�key�config_settings�returncCs.|pi}|�|�pg}t|t�r*t�|�S|S)aA
        Get the value of a specific key in ``config_settings`` as a list of strings.

        >>> fn = _ConfigSettingsTranslator()._get_config
        >>> fn("--global-option", None)
        []
        >>> fn("--global-option", {})
        []
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': ['foo']})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo'})
        ['foo']
        >>> fn("--global-option", {'--global-option': 'foo bar'})
        ['foo', 'bar']
        )�get�
isinstance�str�shlex�split)rrWrX�cfg�optsrrr �_get_config�sz%_ConfigSettingsTranslator._get_config)rXrYccs�|pi}hd�}d|vs d|vrRt|�d�p8|�d�p8d�}|��|vrLdndVd|vsbd|vr�t|�d�pz|�d�pzd�}|��|vr�dndV|�d	|�Ed
Hd
S)a�
        Let the user specify ``verbose`` or ``quiet`` + escape hatch via
        ``--global-option``.
        Note: ``-v``, ``-vv``, ``-vvv`` have similar effects in setuptools,
        so we just have to cover the basic scenario ``-v``.

        >>> fn = _ConfigSettingsTranslator()._global_args
        >>> list(fn(None))
        []
        >>> list(fn({"verbose": "False"}))
        ['-q']
        >>> list(fn({"verbose": "1"}))
        ['-v']
        >>> list(fn({"--verbose": None}))
        ['-v']
        >>> list(fn({"verbose": "true", "--global-option": "-q --no-user-cfg"}))
        ['-v', '-q', '--no-user-cfg']
        >>> list(fn({"--quiet": None}))
        ['-q']
        >�0�no�falseZoff�verbosez	--verbose�1z-qz-v�quietz--quietz--global-optionN)r\rZ�lowerra)rrXr_Zfalsey�levelrrr �_global_args�sz&_ConfigSettingsTranslator._global_argsccsT|pi}d|vr2tt|dpd��}|r,dndVd|vrPdt|d�gEdHdS)a�
        The ``dist_info`` command accepts ``tag-date`` and ``tag-build``.

        .. warning::
           We cannot use this yet as it requires the ``sdist`` and ``bdist_wheel``
           commands run in ``build_sdist`` and ``build_wheel`` to reuse the egg-info
           directory created in ``prepare_metadata_for_build_wheel``.

        >>> fn = _ConfigSettingsTranslator()._ConfigSettingsTranslator__dist_info_args
        >>> list(fn(None))
        []
        >>> list(fn({"tag-date": "False"}))
        ['--no-date']
        >>> list(fn({"tag-date": None}))
        ['--no-date']
        >>> list(fn({"tag-date": "true", "tag-build": ".a"}))
        ['--tag-date', '--tag-build', '.a']
        ztag-daterdz
--tag-datez	--no-datez	tag-buildz--tag-buildN)r
r\)rrXr_�valrrr Z__dist_info_args�sz*_ConfigSettingsTranslator.__dist_info_argsccs:|pi}|�d�p|�d�}|s$dSdt|�gEdHdS)a
        The ``editable_wheel`` command accepts ``editable-mode=strict``.

        >>> fn = _ConfigSettingsTranslator()._editable_args
        >>> list(fn(None))
        []
        >>> list(fn({"editable-mode": "strict"}))
        ['--mode', 'strict']
        z
editable-modeZ
editable_modeNz--mode)rZr\)rrXr_�moderrr �_editable_args�s

z(_ConfigSettingsTranslator._editable_argsccs|�d|�EdHdS)av
        Users may expect to pass arbitrary lists of arguments to a command
        via "--global-option" (example provided in PEP 517 of a "escape hatch").

        >>> fn = _ConfigSettingsTranslator()._arbitrary_args
        >>> list(fn(None))
        []
        >>> list(fn({}))
        []
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': ['foo']}))
        ['foo']
        >>> list(fn({'--build-option': 'foo'}))
        ['foo']
        >>> list(fn({'--build-option': 'foo bar'}))
        ['foo', 'bar']
        >>> list(fn({'--global-option': 'foo'}))
        []
        z--build-optionN)ra�rrXrrr �_arbitrary_argssz)_ConfigSettingsTranslator._arbitrary_argsN)
r"r#r$�__doc__r\�_ConfigSettingsrrarrjZ)_ConfigSettingsTranslator__dist_info_argsrmrorrrr rV�s rVc@s�eZdZdd�Zd"dd�Zd#dd�Zd$d	d
�Zeeed�dd
�Zeee	d�dd�Z
d%dd�Zd&dd�Zd'dd�Z
d(dd�Zeeeed�dd�Zes�d)dd�Zd*dd�Zd+d d!�ZdS),�_BuildMetaBackendc
Cs�gtjdd��|�|��d�t_z4t���|��Wd�n1sJ0YWn.ty�}z||j7}WYd}~n
d}~00|S)NrZegg_info)�sys�argvrjr%r,�	run_setuprr)rrX�requirements�errr �_get_build_requiress���
* z%_BuildMetaBackend._get_build_requires�setup.pyc
Cs�tj�|�}d}t|�� }|���dd�}Wd�n1s>0Yzt|t��Wn<ty�}z$|j	rp�t
jdddd�WYd}~n
d}~00dS)N�__main__z\r\nz\nz6Running `setup.py` directly as CLI tool is deprecated.znPlease avoid using `sys.exit(0)` or similar statements that don't fit in the paradigm of a configuration file.zAhttps://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)Zsee_url)r5r6�abspathrP�read�replace�exec�locals�
SystemExit�coder�emit)rrO�__file__r"rBr�rwrrr ru-s
.�z_BuildMetaBackend.run_setupNcCs|j|dgd�S)NZwheel�rv�rxrnrrr rDsz._BuildMetaBackend.get_requires_for_build_wheelcCs|j|gd�S)Nr�r�rnrrr rGsz._BuildMetaBackend.get_requires_for_build_sdist)�metadata_directory�suffixrYcCs.|�||�}t|j|�s(t�t|�|�|jS)z�
        PEP 517 requires that the .dist-info directory be placed in the
        metadata_directory. To comply, we MUST copy the directory to the root.

        Returns the basename of the info directory, e.g. `proj-0.0.0.dist-info`.
        )�_find_info_directoryr
�parent�shutil�mover\r:)rr�r��info_dirrrr �_bubble_up_info_directoryJsz+_BuildMetaBackend._bubble_up_info_directorycs�t�|�D]b\}}}�fdd�|D�}t|�dks>t|�dkr
t|�dksZJd��d���t||d�Sq
d��d|��}t�|��dS)	Ncsg|]}|���r|�qSrr?rA�r�rr r<Yr2z:_BuildMetaBackend._find_info_directory.<locals>.<listcomp>rrz	Multiple z directories foundzNo z directory found in )r5�walk�lenrr	Z
InternalError)rr�r�r��dirsrZ
candidates�msgrr�r r�Wsz&_BuildMetaBackend._find_info_directorycCstgtjdd��|�|��d�d�|�d�t_t��|��Wd�n1sR0Y|�|d�|�|d�S)NrZ	dist_infoz--output-dirz--keep-egg-infoz	.egg-infoz
.dist-info)rsrtrjr4rur��rr�rXrrr rbs"������&z2_BuildMetaBackend.prepare_metadata_for_build_wheelrc
	Cs�tj�|�}tj|dd�d|d�}tjfi|����}gtjdd��|�|��|�d�|�|�t_t	��|�
�Wd�n1s�0Yt||�}tj�||�}	tj�
|	�r�t�|	�t�tj�||�|	�Wd�n1s�0Y|S)NT)�exist_okz.tmp-)�prefix�dirrz
--dist-dir)r5r6r{�makedirs�tempfileZTemporaryDirectoryrsrtrjr4rurHr8rI�remove�rename)
rZ
setup_commandZresult_extensionZresult_directoryrXZarbitrary_argsZ	temp_optsZtmp_dist_dirZresult_basename�result_pathrrr �_build_with_temp_dirss2
������&

4z&_BuildMetaBackend._build_with_temp_dirc
CsDt��*|�dgd|||�|��Wd�S1s60YdS)NZbdist_wheel�.whl)rUr�ro)r�wheel_directoryrXr�rrr r�s�z_BuildMetaBackend.build_wheelcCs|�gd�d||�S)N)Zsdistz	--formats�gztarz.tar.gz)r�)rZsdist_directoryrXrrr r�s�z_BuildMetaBackend.build_sdist)r�rYcCs>|sdStt|��d��}t|�dks*J�|r:t|d�SdS)Nz*.dist-inforr)r&r�globr�r\)rr�Zdist_info_candidatesrrr �_get_dist_info_dir�s
z$_BuildMetaBackend._get_dist_info_dircCsh|�|�}|rd|gng}dg|�|�|��}t�� |�|d||�Wd�S1sZ0YdS)Nz--dist-info-dirZeditable_wheelr�)r�rmrUr�)rr�rXr�r�r`�cmdrrr r�s
�z _BuildMetaBackend.build_editablecCs
|�|�Sr)rrnrrr r�sz1_BuildMetaBackend.get_requires_for_build_editablecCs|�||�Sr)rr�rrr r�s�z5_BuildMetaBackend.prepare_metadata_for_build_editable)ry)N)N)N)r)NN)N)NN)N)N)r"r#r$rxrurrr\r�rr�rr�rrrr��LEGACY_EDITABLErrrrrrr rrs(



�
�
$�

�

�rrcs"eZdZdZd�fdd�	Z�ZS)�_BuildMetaLegacyBackendaOCompatibility backend for setuptools

    This is a version of setuptools.build_meta that endeavors
    to maintain backwards
    compatibility with pre-PEP 517 modes of invocation. It
    exists as a temporary
    bridge between the old packaging mechanism and the new
    packaging mechanism,
    and will eventually be removed.
    ryc
s�ttj�}tj�tj�|��}|tjvr6tj�d|�tjd}|tjd<z*t�j	|d�W|tjdd�<|tjd<n|tjdd�<|tjd<0dS)NrrN)
r&rsr6r5�dirnamer{�insertrt�superru)rrOZsys_pathZ
script_dirZ
sys_argv_0��	__class__rr ru�s



�z!_BuildMetaLegacyBackend.run_setup)ry)r"r#r$rpru�
__classcell__rrr�r r��sr�)<rprJr5r]rsrLr�r.r�rR�pathlibr�typingrrrrrr3r(rr	�_pathr
Z_reqsrrZdistutils.utilr
�__all__�getenvrhrr}r��
BaseExceptionrZdistr%r/r4r>rHrPrUr\rqrVrrr�Z_BACKENDrrrrrrrrrrrrr �<module>s\


-)

Youez - 2016 - github.com/yon3zu
LinuXploit