<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    Re                 @   s   d dl mZ d dlZd dlmZ d dlmZ d dlmZm	Z	 d dl
mZ d dlmZ d dlmZ erd d	lmZmZ d d
lmZ d dlmZ eeZdd Zdd Zdd Zdd ZdS )    )absolute_importN)
FeedParser)pkg_resources)
specifiersversion)NoneMetadataError)display_path)MYPY_CHECK_RUNNING)OptionalTuple)Message)Distributionc             C   s4   | dkrdS t | }tdtt|}||kS )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-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/utils/packaging.pycheck_requires_python   s
    
r   c             C   s   d}t | tjr&| |r&| |}n0| dr@d}| |}ntdt| j d}|dkrht	| |t
 }|| | S )z
    :raises NoneMetadataError: if the distribution reports `has_metadata()`
        True but `get_metadata()` returns None.
    METADATAzPKG-INFOzNo 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&   t | }|d}|dk	r"t|}|S )z_
    Return the "Requires-Python" metadata for a distribution, or None
    if not present.
    zRequires-PythonN)r    getr   )r&   pkg_info_dictr   r   r   r   get_requires_pythonG   s
    
r,   c             C   s2   |  dr.x"| dD ]}| r| S qW dS )N	INSTALLERr   )r   get_metadata_linesstrip)r&   liner   r   r   get_installerX   s
    
r1   )
__future__r   loggingemail.parserr   pip._vendorr   Zpip._vendor.packagingr   r   pip._internal.exceptionsr   pip._internal.utils.miscr   pip._internal.utils.typingr	   typingr
   r   email.messager   Zpip._vendor.pkg_resourcesr   	getLogger__name__r!   r   r    r,   r1   r   r   r   r   <module>   s    
