<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    Re2%                 @   s  d Z ddlZddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ erddlmZm Z m!Z!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z( e e(ge)f Z*e$e"e( e"e( f Z+e,e-Z.e/dej0Z1dd Z2dd Z3dd Z4dd Z5dd Z6dd Z7dd Z8d d! Z9d"d# Z:d$d% Z;d&d' Z<dS )(z;Orchestrator for building wheels from InstallRequirements.
    N)Link)build_wheel_pep517)build_wheel_legacy)
indent_log)
ensure_dir	hash_fileis_wheel_installed)make_setuptools_clean_args)call_subprocess)TempDirectory)MYPY_CHECK_RUNNING)path_to_url)vcs)AnyCallableIterableListOptionalTuple)
WheelCache)InstallRequirementz([a-z0-9_.]+)-([a-z0-9_.!+-]+)c             C   s   t t| S )zjDetermine whether the string looks like an egg_info.

    :param s: The string to parse. E.g. foo-2.1
    )bool_egg_info_research)s r   /builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/wheel_builder.py_contains_egg_info%   s    r   c             C   sz   | j r
dS | jr&|r"td| j dS |r.dS | js:| js>dS || sXtd| j dS | jsvt svtd| j dS dS )zBReturn whether an InstallRequirement should be built into a wheel.Fz(Skipping %s, due to already being wheel.TzCSkipping wheel build for %s, due to binaries being disabled for it.zOUsing legacy 'setup.py install' for %s, since package 'wheel' is not installed.)	
constraintis_wheelloggerinfonameeditable
source_dir
use_pep517r   )req
need_wheelcheck_binary_allowedr   r   r   _should_build.   s,    
r)   c             C   s   t | dtdS )NT)r'   r(   )r)   _always_true)r&   r   r   r   should_build_for_wheel_command[   s    r+   c             C   s   t | d|dS )NF)r'   r(   )r)   )r&   r(   r   r   r    should_build_for_install_commandd   s    r,   c             C   s   | j s| jsdS | jrb| jjrb| j r(t| js2tt| jj}|sHt|| jj	| jr^dS dS | jslt| j
 \}}t|rdS dS )z
    Return whether a built InstallRequirement can be stored in the persistent
    wheel cache, assuming the wheel cache is available, and _should_build()
    has determined a wheel needs to be built.
    FT)r#   r$   linkis_vcsAssertionErrorr   get_backend_for_schemeschemeis_immutable_rev_checkouturlsplitextr   )r&   vcs_backendbaseextr   r   r   _should_cachen   s    	


r8   c             C   s>   t |j}| jst|r.t| r.|| j}n|| j}|S )zdReturn the persistent or temporary cache directory where the built
    wheel need to be stored.
    )r   	cache_dirr-   r/   r8   get_path_for_linkget_ephem_path_for_link)r&   wheel_cachecache_availabler9   r   r   r   _get_cache_dir   s    

r>   c             C   s   dS )NTr   )_r   r   r   r*      s    r*   c          
   C   s`   yt | W n2 tk
r> } ztd| j| dS d}~X Y nX | j t| |||S Q R X dS )zaBuild one wheel.

    :return: The filename of the built wheel, or None if the build failed.
    z Building wheel for %s failed: %sN)r   OSErrorr    warningr"   	build_env_build_one_inside_env)r&   
output_dirbuild_optionsglobal_optionser   r   r   
_build_one   s    
rH   c             C   s  t dd }| jst| jrD| js(tt| j| j| j||jd}nt| j| j	| j
|||jd}|d k	rtj|}tj||}y@t|\}}	t|| td| j||	|  td| |S  tk
r }
 ztd| j|
 W d d }
~
X Y nX | jst| | d S Q R X d S )Nwheel)kind)r"   backendmetadata_directoryrE   tempd)r"   setup_py_pathr$   rF   rE   rM   z3Created wheel for %s: filename=%s size=%d sha256=%szStored in directory: %sz Building wheel for %s failed: %s)r   r"   r/   r%   rL   r   pep517_backendpathr   rN   unpacked_source_directoryosbasenamejoinr   shutilmover    r!   	hexdigest	ExceptionrA   _clean_one_legacy)r&   rD   rE   rF   temp_dir
wheel_path
wheel_name	dest_path
wheel_hashlengthrG   r   r   r   rC      sF    




rC   c             C   sV   t | j|d}td| j yt|| jd dS  tk
rP   td| j dS X d S )N)rF   zRunning setup.py clean for %s)cwdTz Failed cleaning build dir for %sF)	r	   rN   r    r!   r"   r
   r$   rX   error)r&   rF   
clean_argsr   r   r   rY      s    rY   c       	   	   C   s   | sg g fS t dddd | D  t t g g  }}xb| D ]Z}t||}t||||}|rtt||_|jj	|_
|jjst|| q@|| q@W W dQ R X |rt dddd	 |D  |rt d
ddd	 |D  ||fS )zBuild wheels.

    :return: The list of InstallRequirement that succeeded to build and
        the list of InstallRequirement that failed to build.
    z*Building wheels for collected packages: %sz, c             s   s   | ]}|j V  qd S )N)r"   ).0r&   r   r   r   	<genexpr>  s    zbuild.<locals>.<genexpr>NzSuccessfully built %s c             S   s   g | ]
}|j qS r   )r"   )rc   r&   r   r   r   
<listcomp>,  s    zbuild.<locals>.<listcomp>zFailed to build %sc             S   s   g | ]
}|j qS r   )r"   )rc   r&   r   r   r   rf   1  s    )r    r!   rT   r   r>   rH   r   r   r-   	file_pathlocal_file_pathr   r/   append)	requirementsr<   rE   rF   build_successesbuild_failuresr&   r9   
wheel_filer   r   r   build  s4    



rn   )=__doc__loggingos.pathrR   rerU   pip._internal.models.linkr   $pip._internal.operations.build.wheelr   +pip._internal.operations.build.wheel_legacyr   pip._internal.utils.loggingr   pip._internal.utils.miscr   r   r   $pip._internal.utils.setuptools_buildr	   pip._internal.utils.subprocessr
   pip._internal.utils.temp_dirr   pip._internal.utils.typingr   pip._internal.utils.urlsr   pip._internal.vcsr   typingr   r   r   r   r   r   pip._internal.cacher   Zpip._internal.req.req_installr   r   ZBinaryAllowedPredicateZBuildResult	getLogger__name__r    compile
IGNORECASEr   r   r)   r+   r,   r8   r>   r*   rH   rC   rY   rn   r   r   r   r   <module>   sD    
	-	
!3