B
š•Re÷ ã @ sh d dl Z d dlZd dlmZ d dlmZ d dlmZ erLd dl m
Z
mZmZ dd„ Z
dd „ Zd
d„ ZdS )é N)Úparse)Úrequest)ÚMYPY_CHECK_RUNNING)ÚOptionalÚTextÚUnionc C s d| krd S | dd¡d ¡ S )Nú:é r )ÚsplitÚlower)Úurl© 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/urls.pyÚget_url_scheme
s r c C s* t j t j | ¡¡} t dt | ¡¡}|S )zh
Convert a path to a file: URL. The path will be made absolute and have
quoted path parts.
zfile:)ÚosÚpathÚnormpathÚabspathÚurllib_parseÚurljoinÚurllib_requestÚpathname2url)r r r
r
r Úpath_to_url s r c C sz | d¡stdjf tƒ Žƒ‚t | ¡\}}}}}|r<|dkrBd}n&tjdkrVd| }ntdjf tƒ Žƒ‚t
|| ¡}|S )z(
Convert a file: URL to a path.
zfile:z9You can only turn file: urls into filenames (not {url!r})Ú localhostÚ Úwin32z\\z?non-local file URIs are not supported on this platform: {url!r})Ú
startswithÚAssertionErrorÚformatÚlocalsr ÚurlsplitÚsysÚplatformÚ
ValueErrorr Úurl2pathname)r Ú_Únetlocr r
r
r Úurl_to_path s
r' )r r! Zpip._vendor.six.moves.urllibr r r r Úpip._internal.utils.typingr Útypingr r r r r r' r
r
r
r Ú