관리-도구
편집 파일: py_info.cpython-38.pyc
U *�eOc � @ sZ d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlmZm Z ddlmZ e dddd d dg�Zdd � Ze� Ze�d�ZG dd� d�Zedk�rVejdd� Zee�dkr�ed Zedd� ZndZee�dk�red Zedd� ZndZejdd� e e_e� �� Zej�d�eddd� eeddd� f�� dS )z� The PythonInfo contains information about a concrete instance of a Python interpreter. Note: this file is also used to query target interpreters, so can only use standard library methods � )�annotationsN)�OrderedDict� namedtuple)�digits�VersionInfo�major�minor�micro�releaselevel�serialc C s( t t�dtj�dd��� �tj����S )N� �PATHEXT)r ) �listr �fromkeys�os�environ�get�lower�split�pathsep� r r �J/opt/hc_python/lib/python3.8/site-packages/virtualenv/discovery/py_info.py�_get_path_extensions s r z\{\w+\}c @ s� e Zd ZdZdd�dd�Zdd� Zdd � Zed d� �Ze dd � �Z e dd� �Ze dd� �Ze dd� �Z e dd� �Zdejfdd�ZdLdd�Ze dd� �Ze dd� �Ze d d!� �Zd"d#� Zd$d�d%d&�Zd$d�d'd(�Ze d)d*� �Zed+d,� �Zd-d.� ZdZdZedMd/d0��ZedNd1d2��Z d3d4� Z!d5d6� Z"edOd8d9��Z#ed:d;� �Z$ed<d=� �Z%ed>d?� �Z&i Z'dPd@dA�Z(dBdC� Z)edDdE� �Z*dFdG� Z+dHdI� Z,dJdK� Z-dS )Q� PythonInfoz.Contains information for a Python interpreter.�None)�returnc s� dd� }t j� _t�� � _� jdkr0tt j�� _tt j� � _t jdkrJdnd� _ t �d�� _t j � _ tj� _|tt dd ��� _|tt d d ��� _|tt d d ��� _|tt dd ��� _|tt dd ��� _|t j�� _|� j�� _� �� � _ztd � d}W n tk �r d}Y nX |� _t j� _t �� � _tt j dd �� _!t �"� }d |k�rtd � _#� fdd�t �$� D �� _%i � _&nlt jd d� dk�r�d|k�r�d� _#� fdd�t �$� D �� _%i � _&n(d � _#dd� t �$� D �� _%� �'� �(� � _&tt dtt dd ��}dd� d|� ffD �� _ t)� }� j%�*� D ]*}t+�,|�D ]}|�-|dd� � �q*�q|�-d� d d� |D �� _.� fd!d�� j.�/� D �}� �0d"|�� _1� �0d#|�� _2tt d$tt d%d ��� _3d � _4d S )&Nc S s | d krd S t j�| �S �N)r �path�abspath)�vr r r �abs_path# s z%PythonInfo.__init__.<locals>.abs_path�PyPyl �@ � �py_version_nodot�prefix�base_prefix�real_prefix�base_exec_prefix�exec_prefix�venvTF�encodingc s i | ]}|t j|d � jd��qS �F)�expand�scheme�� sysconfig�get_path�sysconfig_scheme��.0�i��selfr r � <dictcomp>R s z'PythonInfo.__init__.<locals>.<dictcomp>� )� � � deb_system�posix_prefixc s i | ]}|t j|d � jd��qS r, r/ r3 r6 r r r8 \ s c S s i | ]}|t j|d d��qS )F)r- )r0 r1 r3 r r r r8 c s �get_makefile_filenameZ_get_makefile_filenamec S s i | ]\}}|d k r||�qS r r �r4 �kr r r r r8 h s � Zmakefile_filename� ����PYTHONFRAMEWORKc S s i | ]}|t �|pd ��qS �r )r0 �get_config_varr3 r r r r8 w s c s0 i | ](\}}||d k r(|� � j�r(� jn|�qS r �� startswithr% � system_prefixr? r6 r r r8 y s � �stdlib� platstdlib�maxsizeZmaxint)5�sys�platform�python_implementation�implementation�tuple�pypy_version_infor �version_inforK �architecturer0 rE Z version_nodot�versionr �name�getattrr% r&