관리-도구
편집 파일: packaging.cpython-36.pyc
3 �Re� � @ s� d dl mZ d dlZd dlmZ d dlmZ d dlmZm Z d dl mZ d dlm Z d dlmZ er�d d lmZmZ d d lmZ d dlmZ eje�Zdd � Zdd� Zdd� Zdd� ZdS )� )�absolute_importN)� FeedParser)� pkg_resources)� specifiers�version)�NoneMetadataError)�display_path)�MYPY_CHECK_RUNNING)�Optional�Tuple)�Message)�Distributionc C s4 | dkrdS t j| �}tjdjtt|���}||kS )a� Check if the given Python version matches a "Requires-Python" specifier. :param version_info: A 3-tuple of ints representing a Python major-minor-micro version to check (e.g. `sys.version_info[:3]`). :return: `True` if the given Python version satisfies the requirement. Otherwise, return `False`. :raises InvalidSpecifier: If `requires_python` has an invalid format. NT�.)r �SpecifierSetr �parse�join�map�str)�requires_python�version_info�requires_python_specifier�python_version� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.py�check_requires_python s r c C s� d}t | tj�r&| j|�r&| j|�}n0| jd�r@d}| j|�}ntjdt| j�� d}|dkrht | |��t � }|j|� |j� S )z� :raises NoneMetadataError: if the distribution reports `has_metadata()` True but `get_metadata()` returns None. �METADATAzPKG-INFOzNo metadata found in %s� N) � isinstancer �DistInfoDistribution�has_metadata�get_metadata�logger�warningr �locationr r �feed�close)�dist� metadata_name�metadata�feed_parserr r r r , s r c C s&