From e32dd27eb784d17328c87a05353de094c4030f69 Mon Sep 17 00:00:00 2001 From: haralmha <47558670+haralmha@users.noreply.github.com> Date: Thu, 11 Nov 2021 17:37:54 +0100 Subject: [PATCH] Generalize env var PYTHON to avoid version conflicts (#27334) * Generalize env var PYTHON to avoid version conflicts * Use available python executable Co-authored-by: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-pythonsollya/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-pythonsollya/package.py b/var/spack/repos/builtin/packages/py-pythonsollya/package.py index 02decf6b86..7e6e1f30fe 100644 --- a/var/spack/repos/builtin/packages/py-pythonsollya/package.py +++ b/var/spack/repos/builtin/packages/py-pythonsollya/package.py @@ -23,3 +23,10 @@ class PyPythonsollya(PythonPackage): depends_on('sollya', type=('build', 'link')) depends_on('py-bigfloat', type=('build', 'run')) depends_on('mpfi', type=('build', 'link')) + + @run_before('build') + def patch(self): + filter_file('PYTHON ?= python2', + 'PYTHON ?= ' + self.spec['python'].command.path, + 'GNUmakefile', + string=True)