관리-도구
편집 파일: meta.cpython-37.pyc
B ��Re� � @ sB d Z ddlZddlZddlZddlZddlZyddlmZ W n e k rX ddl ZY nX yddlmZ 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 d 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-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/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 d Q R X W d 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 s$ t � �}| |d� t|�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'