ó vÆ_c@@søddlmZddlZddlmZddlmZddlmZm Z ddl m Z ddl m Z ddlmZerÁdd lmZmZdd lmZdd lmZnejeƒZd „Zd „Zd„Zd„ZdS(i(tabsolute_importN(t FeedParser(t pkg_resources(t specifierstversion(tNoneMetadataError(t display_path(tMYPY_CHECK_RUNNING(tOptionaltTuple(tMessage(t DistributioncC@sJ|dkrtStj|ƒ}tjdjtt|ƒƒƒ}||kS(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( tNonetTrueRt SpecifierSetRtparsetjointmaptstr(trequires_pythont version_infotrequires_python_specifiertpython_version((sN/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/packaging.pytcheck_requires_pythons !cC@s½d}t|tjƒr9|j|ƒr9|j|ƒ}nF|jdƒr`d}|j|ƒ}ntjdt|jƒƒd}|dkrt ||ƒ‚nt ƒ}|j |ƒ|j ƒS(s :raises NoneMetadataError: if the distribution reports `has_metadata()` True but `get_metadata()` returns None. tMETADATAsPKG-INFOsNo metadata found in %stN(t isinstanceRtDistInfoDistributiont has_metadatat get_metadatatloggertwarningRtlocationR RRtfeedtclose(tdistt metadata_nametmetadatat feed_parser((sN/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/packaging.pyR,s   cC@s:t|ƒ}|jdƒ}|dk r6t|ƒ}n|S(s_ Return the "Requires-Python" metadata for a distribution, or None if not present. sRequires-PythonN(RtgetR R(R$t pkg_info_dictR((sN/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/packaging.pytget_requires_pythonGs   cC@sF|jdƒrBx0|jdƒD]}|jƒr|jƒSqWndS(Nt INSTALLERR(Rtget_metadata_lineststrip(R$tline((sN/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/packaging.pyt get_installerXs  (t __future__Rtloggingt email.parserRt pip._vendorRtpip._vendor.packagingRRtpip._internal.exceptionsRtpip._internal.utils.miscRtpip._internal.utils.typingRttypingRR t email.messageR tpip._vendor.pkg_resourcesR t getLoggert__name__RRRR*R/(((sN/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/packaging.pyts