관리-도구
편집 파일: meta.cpython-38.pyc
U ʗRe� � @ sB d Z ddlZddlZddlZddlZddlZzddlmZ W n e k rX ddl ZY nX zddlmZ W n e k r� ddl mZ Y nX ddlmZ ddlmZmZ ddlmZmZmZ ddlmZmZmZ e�e�Zd d � Zddd �Zefdd�Zdd� Z e�!� Z"e"j#ddd� e"j#dddd� dd� Z$edk�r>e$� dS )z2Build metadata for a project using PEP 517 hooks. � N)�Path� )�BuildEnvironment)�Pep517HookCaller�quiet_subprocess_runner)�tempdir�mkdir_p�dir_to_zipfile)�validate_system�load_system� compat_systemc C s� | � i �}t�d|� |�|� t�d� t� �J}t�d|� | �|i �}tj�||�}t � |tj�|tj�|��� W 5 Q R X d S )NzGot build requires: %sz$Installed dynamic build dependencieszTrying to build metadata in %s)�get_requires_for_build_wheel�log�info�pip_installr � prepare_metadata_for_build_wheel�os�path�join�shutil�move�basename)�hooks�env�dest�reqs�td�filename�source� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/pep517/meta.py� _prep_meta s r! �.c C s� |p t | �}tj�| |pd�}t|� t|� t| |d |�d��}|�t ��2 t � � }|�|d � t|||� W 5 Q R X W 5 Q R X d S )N�distz build-backendzbackend-path�requires) r r r r r r r �get�subprocess_runnerr r r r! )� source_dirr �systemr r r r r �build) s �r) c C s0 t � � }| |d� t|�W 5 Q R � S Q R X d S )N)r )r r )�builder�out_dirr r r �build_as_zip8 s r, c C s: t j�| �} t| �}tjt| |d�}tt|��}t � |�S )z� Given a source directory (root) of a package, return an importlib.metadata.Distribution object with metadata build from that package. )r'