관리-도구
편집 파일: _in_process.cpython-37.pyc
B ��Re� � @ s` d Z ddlmZ ddlmZ ddlZddlZddlZddlmZ ddl Z ddl Z ddlZddlZej d dkr�dd� Zd d � Zndd� Zdd � ZG d d� de�ZG dd� de�ZG dd� de�Zdd� Zdd� Zdd� Zdd� ZdZdd� Zdd� Zd d!� Zd/d"d#�Zd$d%� ZG d&d'� d'e�ZG d(d)� d)e�Zd*d+� Z ddd#d%d+hZ!d,d-� Z"e#d.k�r\e"� dS )0ag This is invoked in a subprocess to call the build backend hooks. It expects: - Command line args: hook_name, control_dir - Environment variables: PEP517_BUILD_BACKEND=entry.point:spec PEP517_BACKEND_PATH=paths (separated with os.pathsep) - control_dir/input.json: - {"kwargs": {...}} Results: - control_dir/output.json - {"return_val": ...} � )�glob)� import_moduleN)�join� c K s. t |ddd��}tj| |f|� W d Q R X d S )N�wzutf-8)�encoding)�open�json�dump)�obj�path�kwargs�f� 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/_in_process.py� write_json! s r c C s$ t | ddd��}t�|�S Q R X d S )N�rzutf-8)r )r r �load)r r r r r � read_json% s r c K s2 t |d��}tj| |fddi|�� W d Q R X d S )N�wbr zutf-8)r r r )r r r r r r r r + s c C s t | d��}t�|�S Q R X d S )N�rb)r r r )r r r r r r / s c @ s e Zd ZdZdd� ZdS )�BackendUnavailablez&Raised if we cannot import the backendc C s || _ d S )N)� traceback)�selfr r r r �__init__6 s zBackendUnavailable.__init__N)�__name__� __module__�__qualname__�__doc__r r r r r r 4 s r c @ s e Zd ZdZdd� ZdS )�BackendInvalidz Raised if the backend is invalidc C s || _ d S )N)�message)r r r r r r <