관리-도구
편집 파일: meta.cpython-36.pyc
3 �Re� � @ s@ d Z ddlZddlZddlZddlZddlZyddljZW n e k rV ddl ZY nX yddlmZ W n e k r� ddl mZ Y nX ddlmZ ddlmZmZ ddlmZmZmZ ddlmZmZmZ eje�Zd d � Zddd �Zefdd�Zdd� Z ej!� 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� | j i �}tjd|� |j|� tjd� t� �J}tjd|� | j|i �}tjj||�}t j |tjj|tjj|��� 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-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/meta.py� _prep_meta s r! �.c C s� |p t | �}tjj| |pd�}t|� t|� t| |d |jd��}|jt ��2 t � � }|j|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 jj| �} t| �}tjt| |d�}tt|��}t j |�S )z� Given a source directory (root) of a package, return an importlib.metadata.Distribution object with metadata build from that package. )r'