summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuhn <michael.kuhn@informatik.uni-hamburg.de>2019-10-23 16:33:42 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-23 09:33:42 -0500
commit64694dfaf8281265e99c6ab88004f94582ec02ee (patch)
tree09218089c405440cdb77652905bce8f85a53cf4c /var
parent466d07558d2016ecd844653b95aca29b3c848b24 (diff)
downloadspack-64694dfaf8281265e99c6ab88004f94582ec02ee.tar.gz
spack-64694dfaf8281265e99c6ab88004f94582ec02ee.tar.bz2
spack-64694dfaf8281265e99c6ab88004f94582ec02ee.tar.xz
spack-64694dfaf8281265e99c6ab88004f94582ec02ee.zip
magics: Use correct python path (#13394)
python~pythoncmd does not provide a python symlink for python3, so make sure we pick the right command.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/magics/package.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py
index d2f3a99003..b281df021b 100644
--- a/var/spack/repos/builtin/packages/magics/package.py
+++ b/var/spack/repos/builtin/packages/magics/package.py
@@ -5,6 +5,7 @@
from spack import *
import glob
+import os
class Magics(CMakePackage):
@@ -105,7 +106,11 @@ class Magics(CMakePackage):
for plfile in glob.glob('*/*.pl'):
filter_file('#!/usr/bin/perl', '#!/usr/bin/env perl', plfile)
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):
args = [