From 3405fe60f177d1bfdde1b9828ea2207ecfb5b891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= <15837247+mofeing@users.noreply.github.com> Date: Wed, 8 Nov 2023 23:20:55 +0100 Subject: [PATCH] libgit2: add python as test dependency (#40863) Libgit2 requires python as build dependency. I was getting an error because it was falling back to system Python which is compiled with Intel compilers and thus, `libgit2` was failing because it couldn't find `libimf.so` (which doesn't make sense). Co-authored-by: Harmen Stoppels --- var/spack/repos/builtin/packages/libgit2/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py index dd09fd8e1e843c..20410cf1c6d814 100644 --- a/var/spack/repos/builtin/packages/libgit2/package.py +++ b/var/spack/repos/builtin/packages/libgit2/package.py @@ -83,6 +83,7 @@ class Libgit2(CMakePackage): depends_on("cmake@2.8:", type="build", when="@:0.28") depends_on("cmake@3.5:", type="build", when="@0.99:") depends_on("pkgconfig", type="build") + depends_on("python", type="test") # Runtime Dependencies depends_on("libssh2", when="+ssh") @@ -123,5 +124,6 @@ def cmake_args(self): # Control tests args.append(self.define("BUILD_CLAR", self.run_tests)) + args.append(self.define("BUILD_TESTS", self.run_tests)) return args