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 <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
haralmha 2021-11-11 17:37:54 +01:00 committed by GitHub
parent 9ce0abf34f
commit e32dd27eb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)