From 50a4b08f655cac53dd75c3c7cc01817d3f5f92f7 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 25 Apr 2024 11:35:11 +0200 Subject: [PATCH] Don't expose protobuf namespace to other packages, breaks torchtext build --- var/spack/repos/builtin/packages/py-torch/package.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 2677105c643..9e8f395cbf4 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -215,10 +215,11 @@ class PyTorch(PythonPackage, CudaPackage, ROCmPackage): # depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml") # depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml") with when("~custom-protobuf"): - depends_on("protobuf@3.13.0", when="@1.10:") - depends_on("protobuf@3.11.4", when="@1.6:1.9") - depends_on("protobuf@3.6.1", when="@1.1:1.5") - depends_on("protobuf@3.5.0", when="@1.0") + with default_args(type="build"): + depends_on("protobuf@3.13.0", when="@1.10:") + depends_on("protobuf@3.11.4", when="@1.6:1.9") + depends_on("protobuf@3.6.1", when="@1.1:1.5") + depends_on("protobuf@3.5.0", when="@1.0") with default_args(type=("build", "run")): depends_on("py-protobuf@3.13", when="@1.10:") depends_on("py-protobuf@3.11", when="@1.6:1.9")