ok
Direktori : /proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/ |
Current File : //proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyc |
� Bu�_c @@ 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 r� d d l m Z m Z d d l m Z d d l m Z n e j e � Z d � Z d � Z d � Z d � Z d S( i ( t absolute_importN( t FeedParser( t pkg_resources( t specifierst version( t NoneMetadataError( t display_path( t MYPY_CHECK_RUNNING( t Optionalt Tuple( t Message( t Distributionc C@ sJ | d k r t St j | � } t j d j t t | � � � } | | k S( s� 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. t .N( t Nonet TrueR t SpecifierSetR t parset joint mapt str( t requires_pythont version_infot requires_python_specifiert python_version( ( sN /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyt check_requires_python s !c C@ s� d } t | t j � r9 | j | � r9 | j | � } nF | j d � r` d } | j | � } n t j d t | j � � d } | d k r� t | | � � n t � } | j | � | j � S( s� :raises NoneMetadataError: if the distribution reports `has_metadata()` True but `get_metadata()` returns None. t METADATAs PKG-INFOs No metadata found in %st N( t isinstanceR t DistInfoDistributiont has_metadatat get_metadatat loggert warningR t locationR R R t feedt close( t distt metadata_namet metadatat feed_parser( ( sN /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyR , s c C@ s: t | � } | j d � } | d k r6 t | � } n | S( s_ Return the "Requires-Python" metadata for a distribution, or None if not present. s Requires-PythonN( R t getR R ( R$ t pkg_info_dictR ( ( sN /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyt get_requires_pythonG s c C@ sF | j d � rB x0 | j d � D] } | j � r | j � Sq Wn d S( Nt INSTALLERR ( R t get_metadata_linest strip( R$ t line( ( sN /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyt get_installerX s ( t __future__R t loggingt email.parserR t pip._vendorR t pip._vendor.packagingR R t pip._internal.exceptionsR t pip._internal.utils.miscR t pip._internal.utils.typingR t typingR R t email.messageR t pip._vendor.pkg_resourcesR t getLoggert __name__R R R R* R/ ( ( ( sN /opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/packaging.pyt <module> s