o ai @ s d Z ddlZddlZddlZddlZddlmZmZ ddl Z ddl mZ ddlZddl Z ddlmZ ddlZddlmZ ddlmZmZ dd lmZ dd lmZ eeZdd Zd d Zdd ZdddZ dddddZ!dd Z"edkrze dS dS )zHCheck a project and backend by attempting to build using PEP 517 hooks. N)isfilejoin)CalledProcessError)mkdtemp )enable_colourful_output)TOMLDecodeError toml_load)BuildEnvironment)Pep517HookCallerc C @ t }z|| td W n ty& td Y W d dS w z | i }td| W n tyK tjddd Y W d dS w z|| td W n tym td Y W d dS w t }td | zz| |i }td| W n ty tjddd Y W t | W d dS w |d std| W t | W d dS t ||}t|rtd| ntd| W t | W d dS t|rtd ntd W t | W d dS W t | nt | w W d dS 1 sw Y d S )N#Installed static build dependencies+Failed to install static build dependenciesFGot build requires: %s'Failure in get_requires_for_build_sdistTexc_info$Installed dynamic build dependencies,Failed to install dynamic build dependencieszTrying to build sdist in %szbuild_sdist returned %rzFailure in build_sdistz.tar.gzz*Filename %s doesn't have .tar.gz extensionOutput file %s existsOutput file %s does not existzOutput file is a tar filezOutput file is not a tar file)r pip_installloginfor errorget_requires_for_build_sdist Exceptionr build_sdistshutilrmtreeendswithpjoinr tarfile is_tarfilehooksZbuild_sys_requiresenvreqstdfilenamepath r+ /builddir/build/BUILDROOT/alt-python310-pip-21.3.1-5.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/pep517/check.pycheck_build_sdist sz % , -&r-