summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Smillie <83249606+jamessmillie@users.noreply.github.com>2024-09-12 15:40:30 -0600
committerGitHub <noreply@github.com>2024-09-12 14:40:30 -0700
commit79d938fb1f76679b19cbe9b76e58036eda52b074 (patch)
treec67260c58d847d2ccf91543860e83c79528153ac
parent6051d56014730528da8dfa69934d93f9b7941a70 (diff)
downloadspack-79d938fb1f76679b19cbe9b76e58036eda52b074.tar.gz
spack-79d938fb1f76679b19cbe9b76e58036eda52b074.tar.bz2
spack-79d938fb1f76679b19cbe9b76e58036eda52b074.tar.xz
spack-79d938fb1f76679b19cbe9b76e58036eda52b074.zip
py-pip package: fix bootstrap for Python 3.12+ on Windows (#46332)
-rw-r--r--var/spack/repos/builtin/packages/py-pip/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/py-pip/package.py b/var/spack/repos/builtin/packages/py-pip/package.py
index 111e50911b..8d7dd6561c 100644
--- a/var/spack/repos/builtin/packages/py-pip/package.py
+++ b/var/spack/repos/builtin/packages/py-pip/package.py
@@ -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"):