관리-도구
편집 파일: depends.cpython-38.opt-1.pyc
U �Qab� � @ s� d dl Z d dlZd dlZd dlmZ ddlmZ ddlmZm Z m Z mZ ddlmZ ddd d gZ G dd� d�Zdd � Zddd �Zddd �Zdd� Ze� dS )� N)� StrictVersion� )�Bytecode)�find_module�PY_COMPILED� PY_FROZEN� PY_SOURCE)� py27compat�Requirer �get_module_constant�extract_constantc @ sH e Zd ZdZddd�Zdd� Zdd � Zddd�Zdd d�Zddd�Z dS )r z7A prerequisite to building or installing a distribution� Nc C sF |d kr|d k rt }|d k r0||�}|d kr0d}| j�t� � | `d S )N�__version__)r �__dict__�update�locals�self)r �name�requested_version�moduleZhomepage� attribute�format� r �6/usr/lib/python3.8/site-packages/setuptools/depends.py�__init__ s zRequire.__init__c C s | j dk rd| j| j f S | jS )z0Return full package/distribution name, w/versionNz%s-%s)r r )r r r r � full_name# s zRequire.full_namec C s* | j dkp(| jdkp(t|�dko(|| jkS )z%Is 'version' sufficiently up-to-date?N�unknown)r r �strr )r �versionr r r � version_ok) s �zRequire.version_okr c C s� | j dkrFz$t| j|�\}}}|r*|�� |W S tk rD Y dS X t| j| j ||�}|dk r|||k r|| jdk r|| �|�S |S )a� Get version number of installed module, 'None', or 'default' Search 'paths' for module. If not found, return 'None'. If found, return the extracted version attribute, or 'default' if no version attribute was specified, or the value cannot be determined without importing the module. The version is formatted according to the requirement's version format (if any), unless it is 'None' or the supplied 'default'. N)r r r �close�ImportErrorr r )r �paths�default�f�p�i�vr r r �get_version. s zRequire.get_versionc C s | � |�dk S )z/Return true if dependency is present on 'paths'N)r( )r r"