3
ƒ”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 | j ddƒd jƒ S )Nú:é r )ÚsplitÚlower)Úurl© r
ú‡/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/utils/urls.pyÚget_url_scheme
s r c C s* t jjt jj| ƒƒ} tjdtj| ƒƒ}|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 s| | j dƒstdjf tƒ Žƒ‚tj| ƒ\}}}}}| s>|dkrDd}n&tjdkrXd| }ntdjf tƒ Žƒ‚t j
|| ƒ}|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 Ú