From f65baad5e40aa984b0e56c224c4bb20e9fb334a8 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 16 Mar 2024 11:57:28 +0100 Subject: [PATCH] Only set Albany python exec. if +py --- var/spack/repos/builtin/packages/albany/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/albany/package.py b/var/spack/repos/builtin/packages/albany/package.py index 9e544230ecf631..1b3ecb7bbb048f 100644 --- a/var/spack/repos/builtin/packages/albany/package.py +++ b/var/spack/repos/builtin/packages/albany/package.py @@ -127,8 +127,6 @@ def cmake_args(self): "ON" if "+mpas" in spec else "OFF"), "-DENABLE_ALBANY_PYTHON:BOOL=%s" % ( "ON" if "+py" in spec else "OFF"), - "-DPYTHON_EXECUTABLE=%s" % ( - spec["python"].command.path if "+py" in spec else ""), "-DENABLE_ALBANY_EPETRA:BOOL=%s" % ( "ON" if "+epetra" in spec else "OFF"), "-DENABLE_MESH_DEPENDS_ON_PARAMETERS:BOOL=%s" % ( @@ -136,6 +134,10 @@ def cmake_args(self): "-DENABLE_OMEGAH:BOOL=%s" % ( "ON" if "+omegah" in spec else "OFF") ]) + if "+py" in spec: + options.append( + "-DPYTHON_EXECUTABLE=%s" % (spec["python"].command.path) + ) if "+sfad" in spec: options.extend([