HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-39.pyc
a

g��eT�@s�ddlZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZdd	lmZe�e�Zd
d�Zdd
�Zdd�Zdd�ZdS)�N)�Message)�
FeedParser)�Optional�Tuple)�
pkg_resources)�
specifiers�version)�Distribution)�NoneMetadataError)�display_pathcCs4|durdSt�|�}t�d�tt|���}||vS)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�.)rZSpecifierSetr�parse�join�map�str)�requires_python�version_infoZrequires_python_specifierZpython_version�r�A/usr/lib/python3.9/site-packages/pip/_internal/utils/packaging.py�check_requires_pythons


rcCs�d}t|tj�r&|�|�r&|�|�}n0|�d�r@d}|�|�}nt�dt|j��d}|durht	||��t
�}|�|�|��S)z�
    :raises NoneMetadataError: if the distribution reports `has_metadata()`
        True but `get_metadata()` returns None.
    ZMETADATAzPKG-INFOzNo metadata found in %s�N)
�
isinstancerZDistInfoDistribution�has_metadata�get_metadata�loggerZwarningr�locationr
rZfeed�close)�distZ
metadata_name�metadataZfeed_parserrrrr&s�


rcCs&t|�}|�d�}|dur"t|�}|S)z_
    Return the "Requires-Python" metadata for a distribution, or None
    if not present.
    zRequires-PythonN)r�getr)rZ
pkg_info_dictrrrr�get_requires_pythonBs

r cCs2|�d�r.|�d�D]}|��r|��SqdS)NZ	INSTALLERr)rZget_metadata_lines�strip)r�linerrr�
get_installerSs

r#)ZloggingZ
email.messagerZemail.parserr�typingrrZpip._vendorrZpip._vendor.packagingrrZpip._vendor.pkg_resourcesr	Zpip._internal.exceptionsr
Zpip._internal.utils.miscrZ	getLogger�__name__rrrr r#rrrr�<module>s