#!/usr/bin/env python
#
# Hi There!
#
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip (version 22.2.2).
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they're looking to run this get-pip.py
# script. Pip has a lot of code to deal with the security of installing
# packages, various edge cases on various platforms, and other such sort of
# "tribal knowledge" that has been encoded in its code base. Because of this
# we basically include an entire copy of pip inside this blob. We do this
# because the alternatives are attempt to implement a "minipip" that probably
# doesn't do things correctly and has weird edge cases, or compress pip itself
# down into a single file.
#
# If you're wondering how this is created, it is generated using
# `scripts/generate.py` in https://github.com/pypa/get-pip.
import sys
this_python = sys.version_info[:2]
min_version = (3, 7)
if this_python < min_version:
message_parts = [
"This script does not work on Python {}.{}".format(*this_python),
"The minimum supported Python version is {}.{}.".format(*min_version),
"Please use https://bootstrap.pypa.io/pip/{}.{}/get-pip.py instead.".format(*this_python),
]
print("ERROR: " + " ".join(message_parts))
sys.exit(1)
import os.path
import pkgutil
import shutil
import tempfile
import argparse
import importlib
from base64 import b85decode
def include_setuptools(args):
"""
Install setuptools only if absent and not excluded.
"""
cli = not args.no_setuptools
env = not os.environ.get("PIP_NO_SETUPTOOLS")
absent = not importlib.util.find_spec("setuptools")
return cli and env and absent
def include_wheel(args):
"""
Install wheel only if absent and not excluded.
"""
cli = not args.no_wheel
env = not os.environ.get("PIP_NO_WHEEL")
absent = not importlib.util.find_spec("wheel")
return cli and env and absent
def determine_pip_install_arguments():
pre_parser = argparse.ArgumentParser()
pre_parser.add_argument("--no-setuptools", action="store_true")
pre_parser.add_argument("--no-wheel", action="store_true")
pre, args = pre_parser.parse_known_args()
args.append("pip")
if include_setuptools(pre):
args.append("setuptools")
if include_wheel(pre):
args.append("wheel")
return ["install", "--upgrade", "--force-reinstall"] + args
def monkeypatch_for_cert(tmpdir):
"""Patches `pip install` to provide default certificate with the lowest priority.
This ensures that the bundled certificates are used unless the user specifies a
custom cert via any of pip's option passing mechanisms (config, env-var, CLI).
A monkeypatch is the easiest way to achieve this, without messing too much with
the rest of pip's internals.
"""
from pip._internal.commands.install import InstallCommand
# We want to be using the internal certificates.
cert_path = os.path.join(tmpdir, "cacert.pem")
with open(cert_path, "wb") as cert:
cert.write(pkgutil.get_data("pip._vendor.certifi", "cacert.pem"))
install_parse_args = InstallCommand.parse_args
def cert_parse_args(self, args):
if not self.parser.get_default_values().cert:
# There are no user provided cert -- force use of bundled cert
self.parser.defaults["cert"] = cert_path # calculated above
return install_parse_args(self, args)
InstallCommand.parse_args = cert_parse_args
def bootstrap(tmpdir):
monkeypatch_for_cert(tmpdir)
# Execute the included pip and use it to install the latest pip and
# setuptools from PyPI
from pip._internal.cli.main import main as pip_entry_point
args = determine_pip_install_arguments()
sys.exit(pip_entry_point(args))
def main():
tmpdir = None
try:
# Create a temporary working directory
tmpdir = tempfile.mkdtemp()
# Unpack the zipfile into the temporary directory
pip_zip = os.path.join(tmpdir, "pip.zip")
with open(pip_zip, "wb") as fp:
fp.write(b85decode(DATA.replace(b"\n", b"")))
# Add the zipfile to sys.path so that we can import it
sys.path.insert(0, pip_zip)
# Run the bootstrap
bootstrap(tmpdir=tmpdir)
finally:
# Clean up our temporary working directory
if tmpdir:
shutil.rmtree(tmpdir, ignore_errors=True)
DATA = b"""
P)h>@6aWAK2mt4n167QOF#Goa003nH000jF003}la4%n9X>MtBUtcb8c|B0kYQr!LeD_y~yljQehBDX
|=wL5{!Pxe&w^D+eD2X7kjijvP@8`6nwn6x~I~~_@96{$qp#vIIWQ9)>-NJWLiop-YRMj7{<WE(>9*W
)0=35wJ8f;<o6z)BDQr;AY#o!>y$7AMy#ef@lcm)bt8px+8ir=0D^7CPVk+TZkem)?EVTKWXP-r8=Bn
YP&5~VwVcn(m<AaOvDnklJRb1{6+RNpjoT@MYar$M$Lh|sGhDV^&``{`usIJz_^@3N;OkqN~;J-$5KH
Q8mhODUOQt2LdSG+SB>%5#btm9?$v%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)dCI{`|hOWhmAwt{gIg=d5&#E7j`U1o%k=2Zd
B@YU;k)V-C++sbU-2WkcwLMfO8f*!}@4#sSjV{WI2;@vXK{~qd`Yti}wrETC|cCbAr@VEr>D9TSy6<o
tzPFTU&jZy2)ft}4}^DvP8N}w<b@|#f`GvwGplau6#APrMd0UZo%3^Rx&5tnZ=cF33-<5=xTy<3Z0vj
}ZVpBT`h1`F>L1Q7<+BD=coNr&m#H+ihfTtaPW*CaBb)EDPhm;MO2-v8~xV^W?=HuYyW@4N)bpD4E7i
PN{ZMpU^EP)h>@6aWAK2mt4n166RfP;hYz002KF000^Q003}la4%nJZggdGZeeUMVs&Y3WM5@&b}n#v
)f!!M+qm&vzXD|*O1321>(h;<YMVGp;;GN}#Ll%h8V!dgAsaPC@Bq@b&g1{yU3`!LNjbSrUrrB}2<$H
QdlyRwLGZ3)RY}(M0~5U7)4C;{q$SyLL73!K-ZEa3vJ<SnC9-6)B{zrxkBcA(77Mm-xM)emZ*OtUJaT
D&HF<kiu^am+5B*L{pV~)}H;bL%ds6VKq6MBNi2=9}B^9)M&x%&V0CK_W9lNy<x3tah0IB!eLqmJ)Ym
pc9CNJ)<VYS~!F)YAOm+S20)B5C}r{^DIa@tan-&8avXCP%vE*fMeuVQjV;qkg_a8D7_)Ed^L*#oUhF
4BUEmhG4&{dfnAPoWy%CPy`;g8tkwK~dj5!=Hz>*H9m*kZ2Qw^`m|qc(NN=wqq5|GLlPN&MICgV>+~1
4Kjm>X;HCMf^KRcX7PDL>&z_9;aGaoGX^*eSUc7ag6`N8Ei+h=W~mbty<vvlp0;_Jx4BEMq`SPU+Kdk
Fsp&WibF{jaRWg;`O(S?gWzS-fS5-DFA4hHJzR5
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7530
最新资源
- 【创新无忧】基于matlab白冠鸡算法COOT优化极限学习机KELM故障诊断【含Matlab源码 10683期】.zip
- 【创新无忧】基于matlab白鲸算法BWO优化极限学习机KELM故障诊断【含Matlab源码 10684期】.zip
- 【创新无忧】基于matlab白鲨算法WSO优化极限学习机KELM故障诊断【含Matlab源码 10686期】.zip
- 【创新无忧】基于matlab白鹭群算法ESOA优化极限学习机KELM故障诊断【含Matlab源码 10685期】.zip
- Simulink微网多逆变器下垂控制仿真模型,下垂系数固定,可调,两台逆变器并联运行,SVPWM控制,算法控制,三相交流电压有效值220V,有注释,通俗易懂
- MATLAB仿真Gough-Stewart并联机器人斯图尔特6自由度并联机器人逆运动学仿真 动力学控制pid控制 1.搭建了六自由度Stewart并联机器人simulink simscape仿真模型
- 基于重复控制的有源电力滤波器谐波抑制策略 APF有源电力滤波器 无功补偿 PI+重复控制 谐波抑制 电流环重复控制,THD小于1%
- 基于空间谱估计的声源定位语音信号处理实验MATLAB代码
- langchain的详解与应用
- 四岔路口红绿灯斑马线,上帝视角数据集
- node-v12.12.0-x64 msi安装包
- node-v14.17.5-x64 msi安装包
- node-v19.9.0-x64 msi 安装包
- 遥感数据处理及可视化-第三方辅助工具集
- 学生作业-图书管理,该项目为html前端项目,主要图书馆首页、图书推荐和图书管理;涉及html、js、css和本地存储;localStorage本地存储方法:getItem、setItem
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈