magics: Use correct python path (#13394)
python~pythoncmd does not provide a python symlink for python3, so make sure we pick the right command.
This commit is contained in:
parent
466d07558d
commit
64694dfaf8
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
import glob
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Magics(CMakePackage):
|
class Magics(CMakePackage):
|
||||||
|
@ -105,7 +106,11 @@ def patch(self):
|
||||||
for plfile in glob.glob('*/*.pl'):
|
for plfile in glob.glob('*/*.pl'):
|
||||||
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', plfile)
|
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', plfile)
|
||||||
for pyfile in glob.glob('*/*.py'):
|
for pyfile in glob.glob('*/*.py'):
|
||||||
filter_file('#!/usr/bin/python', '#!/usr/bin/env python', pyfile)
|
filter_file('#!/usr/bin/python',
|
||||||
|
'#!/usr/bin/env {0}'.format(
|
||||||
|
os.path.basename(
|
||||||
|
self.spec['python'].command.path)),
|
||||||
|
pyfile)
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
args = [
|
args = [
|
||||||
|
|
Loading…
Reference in a new issue