py-pip package: fix bootstrap for Python 3.12+ on Windows (#46332)

This commit is contained in:
James Smillie 2024-09-12 15:40:30 -06:00 committed by GitHub
parent 6051d56014
commit 79d938fb1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,11 +48,20 @@ class PyPip(Package, PythonExtension):
name="pip-bootstrap",
url="https://bootstrap.pypa.io/pip/zipapp/pip-22.3.1.pyz",
checksum="c9363c70ad91d463f9492a8a2c89f60068f86b0239bd2a6aa77367aab5fefb3e",
when="platform=windows",
when="platform=windows ^python@:3.11",
placement={"pip-22.3.1.pyz": "pip.pyz"},
expand=False,
)
resource(
name="pip-bootstrap",
url="https://bootstrap.pypa.io/pip/zipapp/pip-23.1.pyz",
checksum="d9f2fe58c472f9107964df35954f8b74e68c307497a12364b00dc28f36f96816",
when="platform=windows ^python@3.12:",
placement={"pip-23.1.pyz": "pip.pyz"},
expand=False,
)
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/{0}/p/pip/pip-{1}-{0}-none-any.whl"
if version >= Version("21"):