Your IP : 3.137.175.166


Current Path : /opt/alt/python36/lib/python3.6/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/setuptools/__pycache__/build_meta.cpython-36.pyc

3

K�Re'�@s�dZddlZddlZddlZddlZddlZddlZddlZGdd�de�Z	Gdd�dej
j�Zddd	�Zd
d�Z
dd
�Zdd�Zddd�Zddd�Zddd�Zddd�Zddd�ZdS) 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.
�Nc@seZdZdd�ZdS)�SetupRequirementsErrorcCs
||_dS)N)�
specifiers)�selfr�r��/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/build_meta.py�__init__(szSetupRequirementsError.__init__N)�__name__�
__module__�__qualname__rrrrrr'src@s&eZdZdd�Zeejdd���ZdS)�DistributioncCst|��dS)N)r)rrrrr�fetch_build_eggs-szDistribution.fetch_build_eggsccs*tjj}|tj_z
dVWd|tj_XdS)zw
        Replace
        distutils.dist.Distribution with this class
        for the duration of this context.
        N)�	distutils�corer)�cls�origrrr�patch0s

zDistribution.patchN)rr	r
r�classmethod�
contextlib�contextmanagerrrrrrr,sr�setup.pycCsH|}d}ttdt�|�}|j�jdd�}|j�tt||d�t��dS)N�__main__�openz\r\nz\n�exec)	�getattr�tokenizer�read�replace�closer�compile�locals)Zsetup_script�__file__r�f�coderrr�
_run_setup@sr#cCs|pi}|jdg�|S)Nz--global-option)�
setdefault)�config_settingsrrr�_fix_configKsr&cCs~t|�}ddg}tjdd�dg|dt_ytj��t�WdQRXWn,tk
rx}z||j7}WYdd}~XnX|S)N�
setuptools�wheel��egg_infoz--global-option)r&�sys�argvrrr#rr)r%�requirements�errr�_get_build_requiresQs
r/cs�fdd�tj��D�S)Ncs&g|]}tjjtjj�|��r|�qSr)�os�path�isdir�join)�.0�name)�a_dirrr�
<listcomp>asz1_get_immediate_subdirectories.<locals>.<listcomp>)r0�listdir)r6r)r6r�_get_immediate_subdirectories`sr9cCst|�}t|�S)N)r&r/)r%rrr�get_requires_for_build_wheelesr:cCst|�}t|�S)N)r&r/)r%rrr�get_requires_for_build_sdistjsr;cCs�tjdd�dd|gt_t�|}x`dd�tj|�D�}t|�dkrptt|��dkrptjj|tj|�d�}q&t|�dks�t	�Pq&W||kr�t
jtjj||d�|�t
j|dd�|dS)	Nr)Z	dist_infoz
--egg-basecSsg|]}|jd�r|�qS)z
.dist-info)�endswith)r4r!rrrr7usz4prepare_metadata_for_build_wheel.<locals>.<listcomp>rT)�
ignore_errors)
r+r,r#r0r8�lenr9r1r3�AssertionError�shutil�move�rmtree)�metadata_directoryr%Zdist_info_directoryZ
dist_infosrrr� prepare_metadata_for_build_wheelos$rDcCs�t|�}tjj|�}tjdd�dg|dt_t�|dkrVtj|�tj	d|�dd�tj
|�D�}t|�dkszt�|dS)Nr)�bdist_wheelz--global-option�distcSsg|]}|jd�r|�qS)z.whl)r<)r4r!rrrr7�szbuild_wheel.<locals>.<listcomp>r)
r&r0r1�abspathr+r,r#r@rB�copytreer8r>r?)�wheel_directoryr%rC�wheelsrrr�build_wheel�s
rKcCs�t|�}tjj|�}tjdd�dg|dt_t�|dkrVtj|�tj	d|�dd�tj
|�D�}t|�dkszt�|dS)Nr)�sdistz--global-optionrFcSsg|]}|jd�r|�qS)z.tar.gz)r<)r4r!rrrr7�szbuild_sdist.<locals>.<listcomp>r)
r&r0r1rGr+r,r#r@rBrHr8r>r?)�sdist_directoryr%Zsdistsrrr�build_sdist�s
rN)r)N)N)N)NN)N)�__doc__r0r+rr@rr'r
�
BaseExceptionrrFrr#r&r/r9r:r;rDrKrNrrrr�<module>s&






?>